Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you can get macro2 to run when macro1 is running, then I suppose that is
fine. I don't see the point of calling macro1 when you have set the variable to off. I think the references I gave your are better, but it depends on what you are doing and how much time macro1 takes to run and if it needs to be run as much as you have it run. Also, what your are doing may better be handled with events - again, I don't know what you are doing. -- Regards, Tom Ogilvy "grime" wrote: Thanks for the reply, Tom, but this isn't exactly my intention. Here is my current macro (which works, i suppose, but there may be a more elegant way)... Code: -------------------- Public Sub Macro1() Do Until OnOff = 0 DoEvents . . . Loop End Sub -------------------- Code: -------------------- Private Sub Macro2() If OnOff = 0 Then OnOff = 1 Macro1 ElseIf OnOff = 1 Then OnOff = 0 Macro1 End If End Sub -------------------- Is there an easier way? ![]() -- grime ------------------------------------------------------------------------ grime's Profile: http://www.excelforum.com/member.php...o&userid=19227 View this thread: http://www.excelforum.com/showthread...hreadid=546460 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... | Excel Programming |