98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft VBA Training and help » access vba course - Vba Message Box
access vba course - Vba Message Box
Resolved · Low Priority · Version Standard
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
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
VBA tip:Add A New Sheet at the end of the WorkbookTo add a new sheet at the end of the workbook you need to count the sheets in the workbook using: |