View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default If Macro Run From Form Control Button/Shape, "Find" Command Not Working

'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