View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Help with script: STARTING A NEW SUB.. (within sub?)

"FSt1" wrote in message
...
hi
you can't put a sub within a sub as least not like you are trying to do.


You can sort of.


Sub Caller()
Dim x
x = Int(Rnd() * 100) + 1
If x 50 Then GoSub SubInASub
x = 3
Exit Sub
SubInASub:
MsgBox "SubInASub called"
End Sub


Not sure if this addresses the OP's problem; not saying you should do it;
not saying you shouldn't do it; just saying that you can.