mdfahiem
New Member
- Joined
- Oct 10, 2017
- Messages
- 6
Hi Gurus,
I have a scroll bar (form control). There are cells which are updated based on the scroll bar value.
I want to protect the work sheet and I have selected the cells to be protected and have them Locked in format cells --> Protection.
When I scroll to next level, below message is shown:
Microsoft Visual Basic
Run-time error '1004'
Unable to set the Hidden property of the Range class
And there are 3 options: End, Debug and Help
Below is the code:
Sub showcalendar()
LeaveTracker.Columns("B:NI").Hidden = True This is highlighted with yellow color
LeaveTracker.Range(Columns(Range("A3").Value * 31 - 29), Columns(Range("A3").Value * 31 + 1)).Hidden = False
End Sub
I am quite new to the coding.
Please guide me what might be wrong.
Thanks in advance.
Regards,
Fahim
I have a scroll bar (form control). There are cells which are updated based on the scroll bar value.
I want to protect the work sheet and I have selected the cells to be protected and have them Locked in format cells --> Protection.
When I scroll to next level, below message is shown:
Microsoft Visual Basic
Run-time error '1004'
Unable to set the Hidden property of the Range class
And there are 3 options: End, Debug and Help
Below is the code:
Sub showcalendar()
LeaveTracker.Columns("B:NI").Hidden = True This is highlighted with yellow color
LeaveTracker.Range(Columns(Range("A3").Value * 31 - 29), Columns(Range("A3").Value * 31 + 1)).Hidden = False
End Sub
I am quite new to the coding.
Please guide me what might be wrong.
Thanks in advance.
Regards,
Fahim