SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 181 | Next

Jim DeMarco

"Pro Excel 2007 VBA"

txtPhone.Value
.CellPhone = Me.txtCell.Value
End With
End Sub
Private Sub StoreEquipment()
Dim opt As MSForms.OptionButton
With m_oEmployee.Equipment
For Each opt In Me.fraPCType.Controls
If opt.Value = True Then
.PCType = opt.Caption
Exit For
End If
Next
For Each opt In Me.fraPhoneType.Controls
If opt.Value = True Then
.PhoneType = opt.Caption
Exit For
End If
Next
.Location = Me.cboLocation.Text
If Me.chkFaxYN = True Then
.FaxYN = "Y"
Else
.FaxYN = "N"
End If
End With
End Sub
CHAPTER 4 n USERFORMS 184
Private Sub StoreAccess()
Dim opt As MSForms.OptionButton
With m_oEmployee.Access
If Len(Me.cboNetworkLvl.Text & "") > 0 Then
.NetworkLevel = CInt(Me.cboNetworkLvl.Text)
End If
.ParkingSpot = Me.cboParkingSpot.Text
.RemoteYN = Me.cboRemoteAccess.Text
For Each opt In Me.fraBuilding.Controls
If opt.Value = True Then
.Building = opt.Caption
Exit For
End If
Next
End With
End Sub
This code simply takes the data from the screen and holds it in the corresponding object
within cPerson.
Next, we determine what the next page should be (remember that the MultiPage Pages
collection is zero-based, so we??™re subtracting 1 from our Order property to get the value of the
next page).
iNext = m_oWizard.NextPage
Me.MultiPage1.Value = m_colSteps(CStr(iNext)).Order - 1
Me.MultiPage1.Pages((m_colSteps(CStr(iNext)).Page) - 1).Caption = ??
m_colSteps(CStr(iNext)).Caption
Then we call the ShowNextPage method, telling it which way we want to move:
ShowNextPage "up"
The ShowNextPage method looks like this:
Private Sub ShowNextPage(Direction As String)
Dim iCurrPage As Integer
Dim iUpDown As Integer
iCurrPage = MultiPage1.


Pages:
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193