|
||||
Disse websidene oppdateres ikke lengre og er kun tilgjengelig for historikken sin skyld.Klikk her for å gå til den oppdaterte informasjonen. Endre verdi/innhold i mange UserForm-kontrollerI et Excel 5/95 dialogark kan man enkelt endre verdi/innhold i en gruppe kontroller
ved å "loope" gjennom alle kontrollene i en samling, f.eks. slik: For Each cb In dlg.CheckBoxes. Sub ResetAllCheckBoxesInUserForm()
Dim ctrl As Control
For Each ctrl In UserForm1.Controls
If TypeName(ctrl) = "CheckBox" Then
ctrl.Value = False
End If
Next ctrl
End Sub
Sub ResetAllOptionButtonsInUserForm()
Dim ctrl As Control
For Each ctrl In UserForm1.Controls
If TypeName(ctrl) = "OptionButton" Then
ctrl.Value = False
End If
Next ctrl
End Sub
Sub ResetAllTextBoxesInUserForm()
Dim ctrl As Control
For Each ctrl In UserForm1.Controls
If TypeName(ctrl) = "TextBox" Then
ctrl.Text = ""
End If
Next ctrl
End Sub
Dokumentet er sist oppdatert 2000-02-05 22:18:24 Utskriftsvennlig versjon
|
||||
| ||||