apikills
Gebruiker
- Lid geworden
- 14 jul 2005
- Berichten
- 160
Wat is er fout aan onderstaande code ?
Alle hulp is welkom.
Apikills
Private Sub CommandButton1_Click()
'
' Toegangscode en (un)lock-keuze controleren
'
If TextBox1.Value <> "lockme" Then
UserForm3.Show
Else
If OptionButton1.Enabled = False And OptionButton2.Enabled = False Then
MsgBox "Maak een keuze voor Lock of Unlock", vbOKOnly
Else
Dim teller As Integer
For teller = 1 To 31
Sheet(teller).Select
If OptionButton1.Enabled = True Then
ActiveSheet.Unprotect
Else
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
Next
End If
End If
End Sub
Alle hulp is welkom.

Apikills
Private Sub CommandButton1_Click()
'
' Toegangscode en (un)lock-keuze controleren
'
If TextBox1.Value <> "lockme" Then
UserForm3.Show
Else
If OptionButton1.Enabled = False And OptionButton2.Enabled = False Then
MsgBox "Maak een keuze voor Lock of Unlock", vbOKOnly
Else
Dim teller As Integer
For teller = 1 To 31
Sheet(teller).Select
If OptionButton1.Enabled = True Then
ActiveSheet.Unprotect
Else
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End If
Next
End If
End If
End Sub