Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBModal Error
Ok, I have a macro with a userform in it called MainForm.
When I try to run the command MainForm.Show VbModal I get an error. It tells me that the method is not recognized (and it highlights VbModal). When I change the command to MainForm.Show 1 (which is the same as the previous command) I get an error saying that there are the wrong number of arguments. Also, I only get this error on machines running Windows 98. I registered the appropriate DLLs and I have done everything else I can think of to fix this. Can someone please tell me why this is happening and how to fix it? Thanks! ~Jenny |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBModal Error
Excel 97 didn't have any arguments to the Show command I don't believe (at
least it didn't support modeless userforms, so no reason to have an argument). Are these machines running xl97? -- Regards, Tom Ogilvy "Jenny" wrote in message ... Ok, I have a macro with a userform in it called MainForm. When I try to run the command MainForm.Show VbModal I get an error. It tells me that the method is not recognized (and it highlights VbModal). When I change the command to MainForm.Show 1 (which is the same as the previous command) I get an error saying that there are the wrong number of arguments. Also, I only get this error on machines running Windows 98. I registered the appropriate DLLs and I have done everything else I can think of to fix this. Can someone please tell me why this is happening and how to fix it? Thanks! ~Jenny |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBModal Error
Tom,
Ah, it appears that they are using XL97. I can just write a bit of code to check the version before it calls the show event. Thank you for helping out with this one! ~Jen -----Original Message----- Excel 97 didn't have any arguments to the Show command I don't believe (at least it didn't support modeless userforms, so no reason to have an argument). Are these machines running xl97? -- Regards, Tom Ogilvy "Jenny" wrote in message ... Ok, I have a macro with a userform in it called MainForm. When I try to run the command MainForm.Show VbModal I get an error. It tells me that the method is not recognized (and it highlights VbModal). When I change the command to MainForm.Show 1 (which is the same as the previous command) I get an error saying that there are the wrong number of arguments. Also, I only get this error on machines running Windows 98. I registered the appropriate DLLs and I have done everything else I can think of to fix this. Can someone please tell me why this is happening and how to fix it? Thanks! ~Jenny . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBModal Error
Hi Jenny;
With xl97, you can use: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function EnableWindow Lib "user32" _ (ByVal hwnd As Long, ByVal fEnable As Long) As Long Private Sub UserForm_Activate() EnableWindow FindWindow(vbNullString, Application.Caption), 1 End Sub MP "Jenny" a écrit dans le message de ... Tom, Ah, it appears that they are using XL97. I can just write a bit of code to check the version before it calls the show event. Thank you for helping out with this one! ~Jen -----Original Message----- Excel 97 didn't have any arguments to the Show command I don't believe (at least it didn't support modeless userforms, so no reason to have an argument). Are these machines running xl97? -- Regards, Tom Ogilvy "Jenny" wrote in message ... Ok, I have a macro with a userform in it called MainForm. When I try to run the command MainForm.Show VbModal I get an error. It tells me that the method is not recognized (and it highlights VbModal). When I change the command to MainForm.Show 1 (which is the same as the previous command) I get an error saying that there are the wrong number of arguments. Also, I only get this error on machines running Windows 98. I registered the appropriate DLLs and I have done everything else I can think of to fix this. Can someone please tell me why this is happening and how to fix it? Thanks! ~Jenny . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting instances of found text (Excel error? Or user error?) | Excel Worksheet Functions | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming | |||
vbModal, VBA version, StartUpPosition Setting | Excel Programming | |||
vbModal, VBA version, StartUpPosition Setting | Excel Programming | |||
Problem finding vbModal on users PC | Excel Programming |