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

Quote:
Originally Posted by KeriM View Post
I know that. I'm not trying to execute another macro while a macro is running. I'm pausing the current macro to manually do a find (ctrl + F) on another sheet in the workbook to fill in data gaps due to data entry errors and then continue the macro that I paused.

For some reason, when the macro is initiated by a button press, the "find" does not search the whole workbook and only searches the currently selected cell. If I initiate the macro within the VBA window, this does not happen. What I want to know is why.
Quote:
Originally Posted by GS[_2_] View Post
'GS[_2_ Wrote:
;1618581'] Code:-
--------------------

Sub Test()
Stop
End Sub

--------------------


At the "Stop" is when I'd try to do a find on the workbook while
the report was still running the macro.-


You can't execute another macro via the UI so as to interupt code
that is already executing. You have to wait for it to finish.

What you can do is prompt the user for 'Find' criteria and have the
running code process that.

--
Garry

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


I know that. I'm not trying to execute another macro while a macro is
running. I'm pausing the current macro to manually do a find (ctrl +
F) on another sheet in the workbook to fill in data gaps due to data
entry errors and then continue the macro that I paused.

For some reason, when the macro is initiated by a button press, the
"find" does not search the whole workbook and only searches the
currently selected cell. If I initiate the macro within the VBA
window, this does not happen. What I want to know is why.


While code is "in play", Excel usually forbids any interaction until
that code "ends" -OR- the code itself prompts the user for interactive
input via an appropriate method.

--
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,

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.