Microsoft Office Tutorials and References
In Depth Information
Creating Wizards
Dim i As Long
‘ Set up the Ratings page?
If MultiPage1.Value = 3 Then
‘ Create an array of CheckBox controls
Dim ProdCB(1 To 3) As MSForms.CheckBox
Set ProdCB(1) = cbExcel
Set ProdCB(2) = cbWord
Set ProdCB(3) = cbAccess
‘ Create an array of Frame controls
Dim ProdFrame(1 To 3) As MSForms.Frame
Set ProdFrame(1) = FrameExcel
Set ProdFrame(2) = FrameWord
Set ProdFrame(3) = FrameAccess
TopPos = 22
FSpace = 8
AtLeastOne = False
‘ Loop through all products
For i = 1 To 3
If ProdCB(i) Then
ProdFrame(i).Visible = True
ProdFrame(i).Top = TopPos
TopPos = TopPos + ProdFrame(i).Height + FSpace
AtLeastOne = True
Else
ProdFrame(i).Visible = False
End If
Next i
‘ Uses no products?
If AtLeastOne Then
lblHeadings.Visible = True
Image4.Visible = True
lblFinishMsg.Visible = False
Else
lblHeadings.Visible = False
Image4.Visible = False
lblFinishMsg.Visible = True
If tbName = “” Then
lblFinishMsg.Caption = _
“A name is required in Step 1.”
Else
lblFinishMsg.Caption = _
“Click Finish to exit.”
End If
End If
End If
End Sub
 
Search JabSto ::




Custom Search