Excel Userform - Runs fine but other users get a compile error Would you take out all your code from module, module of form and sheets here IMHO, you have mistake somewhere...
Did you try to use the code, which I'd given for you last time Make it in new book and - maybe - you will find some cause Tag: Pivot table updating
Send Outlook message via VBA Macro in Excel I have a very similar problem that started last night. The VB code "ol=NEW Outlook.Application" causes the "The specified module could not be found." error. This should be functionally identical to the CreateObject command. The changes that I made were to uninstall Norton AV and to install MS OneCare Beta. It still fails with all functions of OneCare disabled. Tag: Pivot table updating
ReportFault() vs. WerReportCreate/WerReportSubmit() on Vista Claus Brod wrote:
Hi all, I'm experimenting with the available APIs for error reporting. On XP systems, I'm using ReportFault(), which seems to work as expected- it displays the WER dialogs, sends data to the Winqual site (including minidump data), launches a debugger when asked for by the user etc.
That doesn't sound correct to me. In my experience, ReportFault() just returns frrvLaunchDebugger when somebody hits the 'debug' button and it is then up to you to do the launching. Are you sure you're not just seeing the exception go all the way out to the Unhandled Exception Filter provided by the O/S, which itself calls ReportFault() and knows how to launch the debugger Tag: Pivot table updating
iexplore.exe - Application Error (EVERY TIME I CLOSE IE7) :( The same exact thing is happening every time I close IE7. The location number is different for me (0x7c812a5b). Immediately after clicking okay for that error window... I get another. It reads "Runtime error 217 at "039EFD29". Browsing around the site here... this seems to be some sort of conflict between IE7 and Norton 2007.
I read in a thread for the runtime error to do the following: Control Panel > Internet Options > Advanced (tab) > RESET Tag: Pivot table updating
VBA macro for Excel for extracting and 'depositing' text between brackets... Dear Catherine... This actually works and even I (a complete programming ignoramus) have been able to implement it. I'm very grateful - thank you very much - you have saved me hours and hours of painstaking manual selecting, cutting and pasting. I wonder if I could ask you one further favour If you have time, could you possibly tell me - only if you have a spare ten minutes of so - what each line of code does I'm trying to learn VBA, but am doing it in a rather haphazard, non-linear way. If you could explain the rationale behind each snippet, I'm sure I could learn something... Thanks again. All the best... Josh Tag: Pivot table updating
Command for insert picture Hi , could someone pls advise the command for to insert picture to excel using vb command. Dim img as image how to mention location of file name , path directory . what if the file name and path...
pls advise Tag: Pivot table updating
Run-time error '13': Type Mismatch i always get this error when i try to run...does anyone know what's the problem
Code Snippet
Option Explicit
Private Sub UserForm_Initialize() UpdateData cbxDept.AddItem "Marketing & Sales" cbxDept.AddItem "Supply Chain" cbxDept.AddItem "Purchasing" cbxDept.AddItem "Technical & Production" cbxDept.AddItem "Research & Development" cbxDept.AddItem "Finance & Control" cbxDept.AddItem "Human Resource" cbxDept.AddItem "Globe & ISIT Services" End Sub
Private Sub cmdPrevious_Click() If txtRow.Text > 1 Then txtRow.Velue = txtRow.Value - 1 UpdateData End Sub
Private Sub cmdNext_Click() If txtRow.Text < Range("Database").Rows.Count Then txtRow.Value = txtRow.Value + 1 UpdateData End Sub
Private Sub txtFName_AfterUpdate() Range("A2")(txtRow.Text).Value = txtFName.Value End Sub
Private Sub txtLName_AfterUpdate() Range("B2")(txtRow.Text).Value = txtLastName.Value End Sub
Private Sub cbxDept_AfterUpdate() Range("C2")(txtRow.Text).Value = cbxDept.Value End Sub
Private Sub txtRow_AfterUpdate() If txtRow.Text < 1 Then txtRow.Text = 1 ElseIf txtRow.Text > Range("Database").Rows.Count Then txtRow.Text = Range("Database").Rows.Count End If UpdateData txtFName.SetFocus End Sub
Private Sub UpdateData() txtFName.Text = Range("A2")(txtRow.Text).Value txtLName.Text = Range("B2")(txtRow.Text).Value cbxDept.DropButtonStyle = Range("C2")(txtRow.Text).Value End Sub
thanx Tag: Pivot table updating
Sorting cells in a spreadsheet by colour Dear bi-lya ... I have incoorporated this code into my spreadsheet, but it does not appear to have any effect whatsoever. It doesn't even generate an error! What could I be doing wrong Is it enough to simply paste this code into "Book 1 - Sheet1" in the Visual Basic editor Please forgive my ignorance - I have absolutely no programming experience... Regards, Josh Ord-Hume Tag: Pivot table updating
ACCESS - You do not have exclusive access to the database If you have databound controls locking the remote tables, (I'm guessing 21 linked tables), Access is reflecting the locks.
To resolve this, Import the tables periodically instead of linking them.
Adamus Tag: Pivot table updating
0x01ef852e referenced Memory error I'm not sure if this is the right place to post this...but here it is anyway...
When trying to run Everquest with windows Vista I've received this error:
The instruction at 0x01ef852e referenced memory at 0xfffffc. The memory could not be read.
I have no clue what it's for or means or how to fix it...if anyone has a clue PLEASE let me know.
After receiving the error the game patcher etc all crashes. I can not get it to load past the patcher which completes and is fine until clicking the PLAY button.
Please help! Tag: Pivot table updating
Question: How do I hide the Title Bar? Hi, Have a look at Stephen Bullen's FunForm workbook. http://www.oaltd.co.uk/Excel/Default.htm I know his code is designed to apply the formatting to a userform. But by changing the code in the class to use the application window handle rather than the userform the effects still work. But be very careful when playing around with application setting. Make sure your code returns the enviroment to the same state you found it in. Nothing worse than using somebodys code only to find it leaves excel in an unusable and re-arrange state. Tag: Pivot table updating
Reversing a lists order in excel for my macro Hi there. I have a macro that im building within excel, but am stuck on an excel function. Does anyone know how to reverse the order of a list ini excel. I have a column set up of names. How can i select this list and have it reverse the list in a separate column. I dont want it reversed alphabetically, or numerically... my example would be this...
Cell A1 - A5
Paul Barry John Steve Jim
i would like to either select the 5 cells and have click a button to reverse this order, or have it return the reversed order in column B1 - B5... giving me the result of
Jim Steve John Barry Paul
The only way ive seen how to do it is with the offset function but ive had alot of trouble with that for some reason and hoped someone had another idea.
Thankyou! Tag: Pivot table updating
SQL code Hello,
I am trying to find out how to write code in Visual Basic that will update a table in SQL. I already have the database in SQL open, but the problem I have is the actual update portion of the code. Can anyone help me
Here is a sample of my code:
Function update() 'This function allows you to update and change specified records and columns in tables in 'the databases provided
' These variables store the text of the file. Dim FHA_Case As String Dim SeqNumber As String Dim SSN, LName, FileNum, FName As String Dim name, Street, City, State, Zip As String Dim SQL1, SQL2 As String Dim rs1 As New ADODB.Recordset Set rs1 = New ADODB.Recordset Dim rs2 As New ADODB.Recordset Set rs2 = New ADODB.Recordset Dim cnn As New ADODB.Recordset cnn.Open "Provider=SQLOLEDB.1;Password=simple;Persist Security Info=True;User ID=sa;Initial Catalog=HUDGUISQL;Data Source=HOST\SQLEXPRESS;" With rs1 .CursorLocation = adUseClient .CursorType = adOpenDynamic .LockType = adLockPessimistic End With SQL1 = "Select * from [ToHUD-FISR1132C-CD57];"
rs1.Open SQL1, cnn, adOpenKeyset, adLockPessimistic Do While Not rs1.EOF FHA_Case = rs1![CaseNum] SeqNumber = rs1![SeqNum]
If Not rs2.EOF Then
rs2.Edit rs2!BatchID = rs1!BatchIDNumA rs2!ClmntSSN = rs1!ClmntSSNEIN rs2!ClinType = "CC"
rs2.update End If
rs1.MoveNext rs2.Close Loop rs1.Close cnn.Close End Function
The error that I am getting says "Method or data member not found" for the line: "rs2.Edit" Tag: Pivot table updating
MS CRM 3 and outlook I have MS CRM installed and I have offiice 2k3 installed and windows is fully updated, but I keep getting a message when I load outlook that ms crm server is unavailble, but my we client works well. Tag: Pivot table updating
VBA Excel, AND/OR condition behavior. Hello guys,
I just need a quick answer to comfirm the AND/OR behavior. Some languages stop evaluate the condition is the condition is already met, like is False AND Null will give you False, and True OR Null will give you True. Instead of doing that, it seems like VBA will evaluate the full statement. Like False AND Null = Error. Is this correct
Thank you. Tag: Pivot table updating
MS Office document and image writer print driver 1. Go to Control panel ¨C Printer and fax 2. Add Printer ¨C select local printer attached then manual 3. In the port option select Document image printer writer port 4. Install a generic text only printer. 5. Right-click on the generic text/only printer driver and select properties. 6. Click on ports and select "Microsoft office document imaging driver port" 7. Click on the advanced tab and change the driver to Microsoft office document image writer 8. Click on apply and OK Tag: Pivot table updating
How to implement DirListBox and FileListBox in VBA forms? Hi,
I am working with VBA in Bentley Microstation 8.0. I wanted to know whether there is a way to implement the DirListBox and FileListBox (that are present by default in VB 6.0 toolbox) in VBA forms
I think people from the VBA team in Microsoft can only answer this. Any help from any corner would be great.
Regards,
shiva Tag: Pivot table updating
Report stolen product keys? Is there any way to report stolen product keys that can be marked as such Someone got a hold of one of my MSDN licenses for Vista and is going to use it for their own personal use.
Thank you. Tag: Pivot table updating
Locking clickable labels Can you lock a label like you can a toggleButton I have some code as follows; If toggleButton1.value = True Then togglebutton2.locked = True Else togglebutton2.locked = False End If But I also want to temporarily lock some clickable labels, but there is no ".locked" function for labels. How do I stop a label's click action from being allowable under certain circumstances Thanks. Tag: Pivot table updating
Office 10 \ winword.exe runtime error Hello
I have been having exactly the same problem and needed to urgently use my powerpoint presentation and modify it ASAP I spent all day trying to sort the problem however when I uninstalled the 2003 powerpptwiz etc & powerpoint immediately worked.
No more downloads for me!
Have a great day I am excited now I can finish my presentation although I have wasted many hours searching for a solution. Tag: Pivot table updating
Learning VBA I signed up for an independent study in VBA. The textbook, Course ILT MS VBA Programming was written in 2001. I am using MS Office 2003. There must have been changes VBA; I cannot find Auto List Members nor can I find Auto Quick Info which are supposed to be in the Options tool box. I would really appreciate any help.
thank you Tag: Pivot table updating
Corrupt email causes Outlook Express to freeze Today when I brought my email in, the computer got stuck at some point. It wouldn't react to anything, not even Ctrl+Alt+Del.
I've been trying many things for hours and hours, but the problem remains.
As soon as I stand on this particular email where the above happened, OE freezes. As long as I work around it, all goes well.
How can I delete this corrupt email
If you want to send me an answer here that would be great. If you could send it to this email address, even better:
consulti@xs4all.nl
Thanks!
Caroline Tag: Pivot table updating
MergeSort for Double Arrays One change you can make to speed things a little is to move the Redim out of the loops in the SplitArray routine. Sub Tester()
Dim Original_Vector() As Double
Dim Sorted_Vector() As Double
Dim lngIndex As Long
Const MAX_ELEMENTS = 50 '
ReDim Original_Vector(MAX_ELEMENTS)
For lngIndex = 1 To MAX_ELEMENTS
Original_Vector(lngIndex) = Rnd() * MAX_ELEMENTS
Next
Sorted_Vector = MergeSort(Original_Vector)
End Sub
Public Function MergeSort(Doubles() As Double) As Double() Dim Left() As Double, Right() As Double ' Only 1 element If (UBound(Doubles) - LBound(Doubles)) = 0 Then MergeSort = Doubles Exit Function ' Only 2 elements ElseIf (UBound(Doubles) - LBound(Doubles)) = 1 Then MergeSort = Sort2(Doubles) Exit Function Else NewSplitArray Doubles, Left, Right 'Divide to conquer >:) Left = MergeSort(Left) 'Call MergeSort on the small parts of the original vector Right = MergeSort(Right) ' same here MergeSort = MergeArray(Left, Right) ' At the end, merge the End If End Function Private Sub NewSplitArray(Doubles() As Double, _ DoubleOut1() As Double, DoubleOut2() As Double) ' Because DoubleOut1 and 2, as well Doubles are passed ByRef, the changes here affect the original ones too. Dim middle, pos_Doubles, pos_Quebrado As Long middle = Int((UBound(Doubles) - LBound(Doubles)) / 2) pos_Quebrado = 0 ' Moved out of loop so resize happens only once ReDim DoubleOut1(middle - 1) For pos_Doubles = 0 To (middle - 1) DoubleOut1(pos_Quebrado) = Doubles(pos_Doubles) pos_Quebrado = pos_Quebrado + 1 Next pos_Quebrado = 0 ReDim DoubleOut2(UBound(Doubles) - middle) For pos_Doubles = middle To UBound(Doubles) DoubleOut2(pos_Quebrado) = Doubles(pos_Doubles) pos_Quebrado = pos_Quebrado + 1 Next End Sub Private Function MergeArray(Double1() As Double, Double2() As Double) As Double() Dim pos1, pos2 As Long Dim Array_Final() As Double 'Check if Double1 or Double2 are empty On Error Resume Next ' Test works on Variants not Double as these will always be FALSE ''' If IsEmpty(Double1(0)) Then ''' MergeArray = Double2 ''' Exit Function ''' ElseIf IsEmpty(Double2(0)) Then ''' MergeArray = Double1 ''' Exit Function ''' End If ReDim Array_Final((UBound(Double1) - LBound(Double1) + 1) + (UBound(Double2) - LBound(Double2) + 1) - 1) 'Set the inicial positions as the lower indexes of Double1 and Double2 pos1 = LBound(Double1) pos2 = LBound(Double2) 'While the indexes are "inside" the vectors, you search for the lower one Do Until pos1 > UBound(Double1) Or pos2 > UBound(Double2) Do While (pos1 <= UBound(Double1) And pos2 <= UBound(Double2)) If Double1(pos1) <= Double2(pos2) Then Array_Final(pos1 + pos2) = Double1(pos1) pos1 = pos1 + 1 Else Exit Do End If Loop Do While (pos1 <= UBound(Double1) And pos2 <= UBound(Double2)) If Double2(pos2) <= Double1(pos1) Then Array_Final(pos1 + pos2) = Double2(pos2) pos2 = pos2 + 1 Else Exit Do End If Loop Loop 'Finish the merge, because one of the vectors didn't go until the end. If pos1 > UBound(Double1) Then Do Until pos2 > UBound(Double2) Array_Final(pos1 + pos2) = Double2(pos2) pos2 = pos2 + 1 Loop Else ' pos2 > UBound(Double2) Do Until pos1 > UBound(Double1) Array_Final(pos1 + pos2) = Double1(pos1) pos1 = pos1 + 1 Loop End If MergeArray = Array_Final End Function Public Function Sort2(Doubles() As Double) As Double() 'Comes here when there's only 2 elements to sort Dim temp As Double If Doubles(0) > Doubles(1) Then temp = Doubles(0) Doubles(0) = Doubles(1) Doubles(1) = temp End If Sort2 = Doubles End Function Tag: Pivot table updating
Printing a long userform I have created an input form for Excel using VBA, but when I try to print the form using PrintForm, I only get a screenshot (the same as PrintScreen). The form is about the same size as 8.5 X 11 paper. Is there a way to change the size of the print area Tag: Pivot table updating