Dimitrios has attended:
Excel Advanced course
Excel VBA Intro Intermediate course
Vba Message Box
Hello,
I would like to create a message box where it will say: "Copy yesterday's data?". If the user replies yes, then i want it to execute the macro that i have created in VBA (named Main) eitherwise do nothing. So far, my macro lloks like this:
Sub Main()
Application.ScreenUpdating = False
Prices
Weights
Values
Exit Sub
Dim reply As Integer
reply = MsgBox("Copy Yesterday's Data?", vbYesNo)
If reply = vbYes Then
Else
Resume
End If
I am not sure what to add after the THEN in order to make it run the MAIN sub. any help will be greatly appreciated.
RE: Vba Message Box
Dimitrios
After the THEN you enter the following line:
Call Main
This runs the Main macro.
Regards
Carlos