Let's create the following simple example. You want to make a 2-step wizard
1) Add 2 Userforms, and add 1 modul
2) Name the Userforms "UserForm1" and "UserForm2"
3) In the first Userform, add 2 commandbuttons
1st button : caption = "Cancel", name = "cmb_cancel
2nd button : caption = "Next", name = "cmb_next
4) In the second Userform, add 3 commandbuttons
1t button : caption = "Cancel", name = "cmb_cancel
2nd button : caption = "Back", name = "cmb_back
3rd button : caption = "Next", name = "cmb_next
5) Place the following code into the two forms and module
'----------UserForm1 Code------------------------
Private Sub cmb_cancel_Click(
Me.Hid
End Su
Private Sub cmb_next_Click(
Me.Hid
UserForm2.Sho
End Su
'-------------------------------------------------------
'----------UserForm2 Code------------------------
Private Sub cmb_back_Click(
Me.Hid
UserForm1.Sho
End Su
Private Sub cmb_cancel_Click(
Me.Hid
End Su
Private Sub cmb_finish_Click(
Me.Hid
'do anything here. For example, collect form dat
End Su
'-------------------------------------------------------
'---------- Module Code------------------------
Sub run_wizard(
UserForm1.Sho
On Error Resume Nex
Unload UserForm
Unload UserForm
End Su
'-------------------------------------------------------
----- hikka wrote: ----
hi, does anybody know how to create a wizard with vba
hikk