dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,352
- Office Version
- 365
- 2016
- Platform
- Windows
I have a button to toggle tool tips in my spreadsheet which are data validation input messages. The button reverses their current state, so if they are off, they will get turned on and vice versa. They used to work and I have no idea why they have stopped working.
The button only calls this sub
When I click my button now, I get an application defined or object defined error. The following line of code is highlighted.
Can someone help me please?
The button only calls this sub
VBA Code:
Sub ToggleTips()
Quoting.Unprotect Password:=ToUnlock
Dim st As Range, cell As Range
For Each st In ActiveSheet.UsedRange
If HasValidation(st) Then
st.Validation.ShowInput = Not st.Validation.ShowInput
End If
Next st
Quoting.Protect Password:=ToUnlock
End Sub
When I click my button now, I get an application defined or object defined error. The following line of code is highlighted.
VBA Code:
st.Validation.ShowInput = Not st.Validation.ShowInput
Can someone help me please?