LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Branching Macro

I am trying to get a macro to “branch” based
upon the
value in a given cell of the worksheet.

Basically if the cell value is zero then the macro should
stop and inform the user with a message box. So the error
can be corrected.

If the cell value is above zero then a longer much more
complete macro should run.(Called Copy_Across which for
simplicity I have paraphrased here)

Any help appreciated.
Paul

Sub Check_Macro()
'
'Check to see closing stock has been entered

If (L53 < 1) Then GoSub Stock_Entry
If (L53 1) Then GoSub Copy_Across
End Sub

Sub Stock_Entry()

MsgBox "No Closing Stock Entered Sunday"
End Sub

Sub Copy_Across()

Application.Goto Reference:="Date_Sheet2"
MsgBox "Ok This Time"

End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Branching Logic after SENDMAIL CPodd Excel Worksheet Functions 0 February 9th 07 04:36 PM
Branching Drop Down Menu tnvis Excel Discussion (Misc queries) 1 October 24th 05 09:02 PM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"