Thread: Gosub - Goto ?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default Gosub - Goto ?

You don't need the gosub (anymore);

Sub test()
test1
MsgBox "after test 1"
End Sub

Sub test1()
MsgBox "test1"
End Sub

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"El Bee" wrote in message ...
| I'm racking my brain; I thought there was a command called gosub that would
| take you to a routine in your macro and then return to the gosub command.
|
| for example.
|
| sub test()
| if x=5 gosub calc_routine
|
| exit sub
|
| : calc_routine
| ' do something
|
| return
| end sub
|
| I've searched this site and MS and I'm stuck.
|
| Thanks