Hey All!
I know how to Run Macro A from Macro B (functions, etc), but how do you run a specific line of code in Macro B from Macro A?
For Example:
Sub Macro A()
QuestionToMessageBox = "Dashboard: You are about to take a SnapShot of the GC Data. Would you like to continue?"
YesOrNoAnswerToMessageBox = MsgBox(QuestionToMessageBox, vbYesNo, "Dashboard SnapShot!")
If YesOrNoAnswerToMessageBox = vbYes Then
GoTo SnapShot:
ElseIf YesOrNoAnswerToMessageBox = vbNo Then
GoTo SnapShotCompleted:
Exit Sub
End If
End Sub
Sub Macro B()
'Lots of code
SnapShotCompleted:
MsgBox "Great it works!!"
'Lots more code
End Sub
On a side note: I'm wondering if I need to call a function in Macro B that grabs some type of data that will trigger the SnapShotCompleted: If so, how... Thanks!
I know how to Run Macro A from Macro B (functions, etc), but how do you run a specific line of code in Macro B from Macro A?
For Example:
Sub Macro A()
QuestionToMessageBox = "Dashboard: You are about to take a SnapShot of the GC Data. Would you like to continue?"
YesOrNoAnswerToMessageBox = MsgBox(QuestionToMessageBox, vbYesNo, "Dashboard SnapShot!")
If YesOrNoAnswerToMessageBox = vbYes Then
GoTo SnapShot:
ElseIf YesOrNoAnswerToMessageBox = vbNo Then
GoTo SnapShotCompleted:
Exit Sub
End If
End Sub
Sub Macro B()
'Lots of code
SnapShotCompleted:
MsgBox "Great it works!!"
'Lots more code
End Sub
On a side note: I'm wondering if I need to call a function in Macro B that grabs some type of data that will trigger the SnapShotCompleted: If so, how... Thanks!