how to step through in set order

Jake975

Board Regular
Joined
Feb 9, 2020
Messages
114
Office Version
  1. 2016
Platform
  1. Windows
Here is the example of the code i need help with
VBA Code:
Sub test()
  ' NightAuditP.ShowMsg "hello", Title:="Testing Mode"
If s = 0 Then
    NightAuditP.ShowMsg "Are you ready to start the night audit file process?" & vbNewLine _
& "This is for the date of: " & Format(Date - 1, "mm-dd-yyyy"), NightAuditP.Previous.Visible = False, Button2Text:="Yes"
 
If s = 1 Then
    NightAuditP.ShowMsg "Have you saved the" & vbNewLine & "Adjustment Log" & vbNewLine & "   & " & vbNewLine & "Daily Cash Log?", Button1Text:="Back", Button2Text:="Next"
   End If
    End If
    
End Sub
I want it to show the first msg then then the button is clicked it shows the second and third and so on but only when the button is clicked and help?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
You can use vbyes and vbno

Declare var

VBA Code:
Dim uAns as integer

uAns =msgbox([your message], vbYesNo)

If uAns = vbYes then
    Positive action here
Else
    Negative action here
End if
 
Upvote 0
Sorry i was doing away with the VBboxes because i need excel to still be interactive and that cant be done with the vbboxes. I have moved to a userform. thanks for the suggestion though.
 
Upvote 0

Forum statistics

Threads
1,224,847
Messages
6,181,331
Members
453,032
Latest member
Pauh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top