Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub LOOP_FRAME1()
Dim c As Control
For Each c In Me.Controls
If (TypeOf c Is CommandButton) And (c.Container.Name = "Frame1") Then
c.Enabled = False
End If
Next c
End Sub
Public Sub LOOP_FRAME1(fram)
Dim c As Control
For Each c In Me.Controls
If (TypeOf c Is CommandButton) And (c.Container.Name = fram) Then
c.Enabled = False
End If
Next c
End Sub
Call DisAbleButtonsOnFrame("Frame1")
[blue]
Private [/blue]Sub DisAbleButtonsOnFrame(ByRef strFra As String)
Dim c As Control
For Each c In Me.Controls
If (TypeOf c Is CommandButton) And (c.Container.Name = strFra) Then
c.Enabled = False
End If
Next c
End Sub
[green]'Code in the Form[/green]
Call DisAbleButtonsOnFrame(Me, "Frame1")
[green]'code in a Module[/green]
[blue]Public[/blue] Sub DisAbleButtonsOnFrame(ByRef frm As Form, ByRef strFra As String)
Dim c As Control
For Each c In frm.Controls
If (TypeOf c Is CommandButton) And (c.Container.Name = strFra) Then
c.Enabled = False
End If
Next c
End Sub
Private Sub CONTROLLO_CAMPI_PRENOTAZIONI()
ER = 0
lCtr = 0
For Each CCONT In Me.Controls
'Debug.Print Val(CCONT.Tag)
If CCONT.Container Is Me.Frame2 And Val(CCONT.Tag) >= 1 And (TypeOf CCONT Is ComboBox) Then
SNAME = CCONT.Name
If CCONT.Text = "" Then
TG = CCONT.Tag
Call SELECT_CASE_P(TG)
ER = ER + 1
End If
End If
Next CCONT
End Sub
[blue]Private Sub Form_Click()
Dim c As Collection
Set c = FindCombosInFrame2WithTagGeOne
Dim v As Variant
' List the ComboBoxes found.
Debug.Print "Comboboxes in Frame2 with Tag value >= 1:"
For Each v In c
If HasIndex(v) Then
Debug.Print v.Name & "(" & v.Index & ")"[b][COLOR=red], v.Tag[/color][/b]
Else
Debug.Print v.Name[b][COLOR=red], v.Tag[/color][/b]
End If
Next
End Sub[/blue]
Private Sub CONTROLLO_CAMPI_PRENOTAZIONI()
ER = 0
lCtr = 0
For Each CCONT In Me.Controls
If TypeOf CCONT Is ComboBox Then[green]
'We are dealing only with ComboBoxes on the Form[/green]
If CCONT.Container Is Me.Frame2 Then[green]
'ComboBoxes on Frame2 only[/green]
If Val(CCONT.Tag) >= 1 Then[green]
'Comboboxes on the Frame 2 with Tag >=1[/green]
SNAME = CCONT.Name
If CCONT.Text = "" Then
TG = CCONT.Tag
Call SELECT_CASE_P(TG)
ER = ER + 1
End If
End If
End If
End If
Next CCONT
End Sub