View Single Post
  #9   Report Post  
KeriM KeriM is offline
Member
 
Posts: 70
Default

Quote:
Originally Posted by GS[_2_] View Post


Garry,

That is usually correct, but I am able to interact with the program
when the code pauses at a "stop" command. I know this works because
I can do it when I don't initialize the macro with the button. I'm
not questing whether or not it will or should work, because I know it
does since I've been doing it without the button for a few months now
with no issues. Something different happens when I click the button
vs just running the macro directly from the VBA window.[/i][/color]

There are some different behaviors when using 'Debug' mode, but even
that disables Excel's menus/keys. Show your actual macro with commented
'stop' point and action to take while stopped...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Garry,

I still cannot upload a sample workbook, I get an "invalid file" error. The macro I gave earlier is a simple example of what triggers it. Please follow the steps below to reproduce what I am experiencing.

1. Put the following macro in a new workbook

Code:
Sub Test()
  Range("D3").Select
  Stop
End Sub
2. Type the word "Holiday" in any cell in Sheet 1. This will be your search term.

3. Create a button or a shape below cell A1 and assign the macro you just wrote to the object.

4. Press the button to run the macro.

5. When the macro pauses at the stop, click into the excel workbook and press "ctrl F" and search for the word "Holiday".

6. You'll notice that the mouse curser is a "+" sign and that it will not find the word.

7. Continue the macro until it stops.

8. Rerun the macro by clicking into the sub procedure itself and running it.

9. When the macro stops, click into the excel workbook and press "ctrl F" and search for the word "Holiday."

10. You'll see that the mouse curser will be normal and it will find the word.