View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Toggle Code Calls

No, don't.

--
Regards,
Tom Ogilvy

"Desert Piranha"
<Desert.Piranha.23yxqn_1141179004.7216@excelforu m-nospam.com wrote in
message news:Desert.Piranha.23yxqn_1141179004.7216@excelfo rum-nospam.com...

Hi Tom,
Thx for the input, I will look at a function.
Dave
Tom Ogilvy Wrote:
Because a sub can't return a value, so it can't have a value of True.

If it was a function and could, then you would have to run it to get
that
value.

--
Regards,
Tom Ogilvy


"Desert Piranha"
<Desert.Piranha.23yvvz_1141176602.7071@excelforu m-nospam.com wrote in
message
news:Desert.Piranha.23yvvz_1141176602.7071@excelfo rum-nospam.com...

Hi all,

If these work, to call macro's:

Sub RunCode1()
Code1
End Sub

Sub RunCode2()
Code2
End Sub

Why dosen't this work, to toggle the calls?
Sub testoftoggle()
If Code1 = True Then
Code2
Else
Code1
End If
End Sub


--
Desert Piranha



------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread:

http://www.excelforum.com/showthread...hreadid=517572



--
Desert Piranha


------------------------------------------------------------------------
Desert Piranha's Profile:

http://www.excelforum.com/member.php...o&userid=28934
View this thread: http://www.excelforum.com/showthread...hreadid=517572