Sweedler
Board Regular
- Joined
- Nov 13, 2020
- Messages
- 114
- Office Version
- 2016
- Platform
- Windows
- MacOS
Hello
I have the following code for a VBA user form and something in it is the reason why my UserForm Box won't open.
I am not sure where things are going wrong, but I wonder exactly what the "sb123" is in reference to.
Help please
I have the following code for a VBA user form and something in it is the reason why my UserForm Box won't open.
VBA Code:
Private Sub lvSektioner_ItemCheck(ByVal Item As MSComctlLib.ListItem)
Dim li As MSComctlLib.ListItem
Dim lRad As Long
Dim b As Boolean
Application.Cursor = xlWait
Application.ScreenUpdating = False
b = IsSheetProtected(shNormal)
If b Then
shNormal.Unprotect "sb123"
End If
Set li = Item
lRad = Mid(Item.Key, 4)
If li.Checked Then
VisaSektion True, lRad
Else
VisaSektion False, lRad
End If
If b Then
shNormal.Protect "sb123"
End If
Application.ScreenUpdating = True
Application.Cursor = xlDefault
End Sub
I am not sure where things are going wrong, but I wonder exactly what the "sb123" is in reference to.
Help please
Last edited by a moderator: