Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM
vbModal, VBA version, StartUpPosition Setting Shoji Karai Excel Programming 0 September 22nd 03 09:30 PM
vbModal, VBA version, StartUpPosition Setting Shoji Kaku Excel Programming 5 September 21st 03 10:01 PM
Problem finding vbModal on users PC Mark Desrosiers Excel Programming 1 August 11th 03 07:55 PM


All times are GMT +1. The time now is 09:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"