![]() |
why the method "show" invalid?
I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA
Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
show is a method relevant for a userform. Use the activate method for
sheets eg thisworkbook.sheets("?????").activate -- Cheers Nigel "kirsten" wrote in message ... I am trying to let the dialoguesheet "?????" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("?????").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
Try:
Application.DialogSheets("Dialog1").Show Regards, Greg "kirsten" wrote: I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
Than you for your prompt answer
when i run code "Application.dialogs("入库对话框").show" , window tell error code 13, type not match when i try code "thisworbook.sheets("入库对话框").activat e", it doesnot execute the dialog what can i do next? "kirsten" wrote: I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
It should be DialogSheets, not Dialogs:
Application.DialogSheets("Dialog1").Show You have: <Application.dialogs("入库对话框").show Regards, Greg "kirsten" wrote: Than you for your prompt answer when i run code "Application.dialogs("入库对话框").show" , window tell error code 13, type not match when i try code "thisworbook.sheets("入库对话框").activat e", it doesnot execute the dialog what can i do next? "kirsten" wrote: I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
Dear Greg,
Thank you for your help, i got two dialogsheets, the code "application.dialogsheets("dialog 1").show" is ok, running the code "application.dialogsheets("dialog 2").show" still occur the error '1004', how this happened? "kirsten" wrote: I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
Maybe there is no dialogsheet with name "dialog 2" ??
Dm Unseen |
why the method "show" invalid?
I quickly added two dialog sheets. The code below successfully called both.
Note that the default names do not have a space between "Dialog" and the index number (e.g. "Dialog1" not "Dialog 1"). I suspect you have a spelling error in the name. Sub ShowDialogSheets() With Application .DialogSheets("Dialog1").Show .DialogSheets("Dialog2").Show End With End Sub "kirsten" wrote: Dear Greg, Thank you for your help, i got two dialogsheets, the code "application.dialogsheets("dialog 1").show" is ok, running the code "application.dialogsheets("dialog 2").show" still occur the error '1004', how this happened? "kirsten" wrote: I am trying to let the dialoguesheet "入库对话框" show while i initialize my VBA Micro,the vba code is as follow: thisworkbook.sheets("入库对话框").show when i run the code, the window tell me error code '1004' and class dialoguesheets's show method invalid. could anyone help me with the problem? thanks |
why the method "show" invalid?
Dear Greg,
i cannot send the workbook to you, pls check your email address. Best Regards! kirsten "Greg Wilson" wrote: I was hasty in my response. If you have a spelling error you shouldn't get error '1004'. Check the spelling anyways. If you don't get it fixed I'm willing to have a look at it. However, I virtually never use DialogSheets so I havn't any experience. You can email the workbook to me and I'll have a look. No promises. Remove the "nospam" from the email address. |
why the method "show" invalid?
That's definately my email address if you remove the "nospam" from it. In
case you don't know, it's standard practice to include dummy text in email addresses to thwart the spammers who use search technology to get valid addresses. For this reason, I can't just spell it out here. This is a direct copy and paste with "nospam" inserted again: If it doesn't work, it's something to do with the mail servers I don't understand. To repeat, I never use DialogSheets so I may have some difficulty. But then it should be a useful learning experience for me. No promises. Regards, Greg "kirsten" wrote: Dear Greg, i cannot send the workbook to you, pls check your email address. Best Regards! kirsten |
All times are GMT +1. The time now is 02:13 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com