Goede avond Helpmij-ers
Met een userform vul ik 10 lottogetallen in op mijn sheet met volgende code :
De cellen in mijn sheet zijn echter geblokkeerd en de sheet is paswoord beveiligd.
Hoe kan ik met vba die beveiliging en blokkade tijdelijk opheffen om de cellen te kunnen invullen?
Bedankt
Pascal
Met een userform vul ik 10 lottogetallen in op mijn sheet met volgende code :
Code:
Private Sub cmdNummersUpdate_Click()
Dim Lotto10Spaarkas As Worksheet
Dim FoundCell As Range
Dim Search As String
Dim eRow As Long
Set wsLotto10Spaarkas = ActiveSheet
With wsLotto10Spaarkas
eRow = ActiveCell.Row
If txt1 <> "" Then .Cells(eRow, 4).Value = FormatNumber(txt1.Value, "0")
If txt2 <> "" Then .Cells(eRow, 5).Value = FormatNumber(txt2.Value, "0")
If txt3 <> "" Then .Cells(eRow, 6).Value = FormatNumber(txt3.Value, "0")
If txt4 <> "" Then .Cells(eRow, 7).Value = FormatNumber(txt4.Value, "0")
If txt5 <> "" Then .Cells(eRow, 8).Value = FormatNumber(txt5.Value, "0")
If txt6 <> "" Then .Cells(eRow, 9).Value = FormatNumber(txt6.Value, "0")
If txt7 <> "" Then .Cells(eRow, 10).Value = FormatNumber(txt7.Value, "0")
If txt8 <> "" Then .Cells(eRow, 11).Value = FormatNumber(txt8.Value, "0")
If txt9 <> "" Then .Cells(eRow, 12).Value = FormatNumber(txt9.Value, "0")
If txt10 <> "" Then .Cells(eRow, 13).Value = FormatNumber(txt10.Value, "0")
End With
Unload Me
End Sub
De cellen in mijn sheet zijn echter geblokkeerd en de sheet is paswoord beveiligd.
Hoe kan ik met vba die beveiliging en blokkade tijdelijk opheffen om de cellen te kunnen invullen?
Bedankt
Pascal