I have taken my first steps into VBA and and with my first attempt I've come up with a problem.
My workbook is sheet and workbook protected (with column formatting allowed) to stop the numerous users destroying my formulas, formatting and print setup when entering data.
Users select from a dropdown list to enter data but some list items are too long to be read so I added a toggle button to temporarily expand the column then the list items can easily be read. Un-toggling returns the column to the original width.
The only VBA that I have implemented is a toggle box in the header row of column D which is linked to this code;
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
'This area contains the things you want to happen
'when the toggle button is not depressed
Columns("D:D").ColumnWidth = 120
Else
'This area contains the things you want to happen
'when the toggle button is depressed
Columns("D:D").ColumnWidth = 40
End If
End Sub
Design mode can be switched on and off by me when everything is password protected and the toggle button works fine but it seems that once I send this to someone else they can no longer change Design Mode to off even though our security settings are the same. This means that the toggle button doesn't work.
Can anyone suggest what is stopping Design Mode from being turned off or better still, a better way to expand/contract columns to make dropdown lists readable?
Thanks
My workbook is sheet and workbook protected (with column formatting allowed) to stop the numerous users destroying my formulas, formatting and print setup when entering data.
Users select from a dropdown list to enter data but some list items are too long to be read so I added a toggle button to temporarily expand the column then the list items can easily be read. Un-toggling returns the column to the original width.
The only VBA that I have implemented is a toggle box in the header row of column D which is linked to this code;
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
'This area contains the things you want to happen
'when the toggle button is not depressed
Columns("D:D").ColumnWidth = 120
Else
'This area contains the things you want to happen
'when the toggle button is depressed
Columns("D:D").ColumnWidth = 40
End If
End Sub
Design mode can be switched on and off by me when everything is password protected and the toggle button works fine but it seems that once I send this to someone else they can no longer change Design Mode to off even though our security settings are the same. This means that the toggle button doesn't work.
Can anyone suggest what is stopping Design Mode from being turned off or better still, a better way to expand/contract columns to make dropdown lists readable?
Thanks