Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Problems with application.Dialogs(xlDialogFormulaFind).Show

Hi,

I'm experiencing weird problems with this 'apparently' basic piece of code:
(where 'Sheet1' is the sheet CodeName)

Sub FindInSht1()
Sheet1.Activate
Columns(2).Select
Application.Dialogs(xlDialogFormulaFind).Show
End Sub

With Excel 2003:
It first worked fine until someone hit the 'Enter' key to run the search
(instead of using the mouse to click on the "find next" or "close button" of
the dialog box), then Excel crashed and sent that message suggesting to
report the error to Microsoft.
I tried several times from different computers and got the same error &
crash problem.

Now, even when it seems to work fine (when using the mouse to click on the
buttons rather than pressing the 'Enter' key), I noticed that after running
the macro, I cannot access any more to the Find dialog box using the
Edition/Find or Replace command or CTRL F, until I close Excel and launch it
again.

I tried the code with Excel 2002:
It doesn't cause Excel to crash (even using the 'Enter' key) but I still
can't access the Find command via the menu after running it.

Does anyone have an idea of what might be causing these surprising
problems??

--

By the way, I have another question: why can't I use
Sheet1.range("b:b").Select?? (using the codename)
It returns an error unless Sheet1 is the activesheet (but in this case, why
would I need to mention it?!)

Thank you for your help!

Lydya



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Problems with application.Dialogs(xlDialogFormulaFind).Show

Lydya,

1. I have had poor results using sheet code names.
Suggest you try substituting the actual worksheet name
for the code name... Worksheets("Name")
or
use the worksheet index number... Worksheets(1)

2. To make a selection on a sheet, the sheet must be the active sheet.
Your code example does not make sheet1 the active sheet.

Jim Cone
San Francisco, USA

"lydya" wrote in message
...
Hi,
I'm experiencing weird problems with this 'apparently' basic piece of code:
(where 'Sheet1' is the sheet CodeName)
Sub FindInSht1()
Sheet1.Activate
Columns(2).Select
Application.Dialogs(xlDialogFormulaFind).Show
End Sub
With Excel 2003:
It first worked fine until someone hit the 'Enter' key to run the search
(instead of using the mouse to click on the "find next" or "close button" of
the dialog box), then Excel crashed and sent that message suggesting to
report the error to Microsoft.
I tried several times from different computers and got the same error &
crash problem.
Now, even when it seems to work fine (when using the mouse to click on the
buttons rather than pressing the 'Enter' key), I noticed that after running
the macro, I cannot access any more to the Find dialog box using the
Edition/Find or Replace command or CTRL F, until I close Excel and launch it
again.
I tried the code with Excel 2002:
It doesn't cause Excel to crash (even using the 'Enter' key) but I still
can't access the Find command via the menu after running it.
Does anyone have an idea of what might be causing these surprising
problems??

By the way, I have another question: why can't I use
Sheet1.range("b:b").Select?? (using the codename)
It returns an error unless Sheet1 is the activesheet (but in this case, why
would I need to mention it?!)
Thank you for your help!
Lydya


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Problems with application.Dialogs(xlDialogFormulaFind).Show

Hi Jim,

Thanks for your answer.

I have anyway tried the code using the sheet name instead of the code name
but I still got the same error & crash problem with the Find dialogbox
displayed by the macro when using the 'Enter' key instead of the click on
the box buttons...

Bye,

Lydya



"Jim Cone" a écrit dans le message de
...
Lydya,

1. I have had poor results using sheet code names.
Suggest you try substituting the actual worksheet name
for the code name... Worksheets("Name")
or
use the worksheet index number... Worksheets(1)

2. To make a selection on a sheet, the sheet must be the active sheet.
Your code example does not make sheet1 the active sheet.

Jim Cone
San Francisco, USA

"lydya" wrote in message
...
Hi,
I'm experiencing weird problems with this 'apparently' basic piece of

code:
(where 'Sheet1' is the sheet CodeName)
Sub FindInSht1()
Sheet1.Activate
Columns(2).Select
Application.Dialogs(xlDialogFormulaFind).Show
End Sub
With Excel 2003:
It first worked fine until someone hit the 'Enter' key to run the search
(instead of using the mouse to click on the "find next" or "close

button" of
the dialog box), then Excel crashed and sent that message suggesting to
report the error to Microsoft.
I tried several times from different computers and got the same error &
crash problem.
Now, even when it seems to work fine (when using the mouse to click on

the
buttons rather than pressing the 'Enter' key), I noticed that after

running
the macro, I cannot access any more to the Find dialog box using the
Edition/Find or Replace command or CTRL F, until I close Excel and

launch it
again.
I tried the code with Excel 2002:
It doesn't cause Excel to crash (even using the 'Enter' key) but I still
can't access the Find command via the menu after running it.
Does anyone have an idea of what might be causing these surprising
problems??

By the way, I have another question: why can't I use
Sheet1.range("b:b").Select?? (using the codename)
It returns an error unless Sheet1 is the activesheet (but in this case,

why
would I need to mention it?!)
Thank you for your help!
Lydya




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
Application.Dialogs(xlDialogPrint).Show - prints too soon Almagg via OfficeKB.com Excel Discussion (Misc queries) 3 April 27th 07 08:17 PM
How to disable the Application Dialogs Philip Excel Programming 1 November 5th 04 08:50 PM
Application.Dialogs(xlDialogFormulaFind).....HELP!!!!!! jason Excel Programming 2 October 1st 04 12:47 PM
xlDialogFormulaFind Dialog Box Len Excel Programming 0 January 7th 04 04:45 PM
application.dialogs(xlDialogSaveAs) AND CHDIR Jules[_2_] Excel Programming 1 September 3rd 03 08:27 PM


All times are GMT +1. The time now is 02:26 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"