create wizard with Excel
hi, does anybody know how to create a wizard with vba? hikk ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
create wizard with Excel
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 ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
All times are GMT +1. The time now is 08:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com