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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default why the method "show" invalid?

Maybe there is no dialogsheet with name "dialog 2" ??

Dm Unseen

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default why the method "show" invalid?

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.


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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.




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default 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


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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
EXCEL allow 2 options on status bar e.g. show "Count" + "Sum" LEJM Excel Discussion (Misc queries) 2 November 15th 07 07:49 PM
if "a" selected from dropdown menu then show "K" in other cell LEGALMATTERS Excel Worksheet Functions 1 April 13th 06 06:05 PM
conditional formula to show "open" or "closed" SBS Excel Worksheet Functions 6 January 28th 06 01:48 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 11:22 AM.

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

About Us

"It's about Microsoft Excel"