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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,214,523
Messages
6,120,034
Members
448,940
Latest member
mdusw

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