Toggle tool tips

dpaton05

Well-known Member
Joined
Aug 14, 2018
Messages
2,352
Office Version
  1. 365
  2. 2016
Platform
  1. 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
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?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Glad to hear you got the solution.

Do you mind posting about your solution? Then it is perfectly fine to mark your post as the solution to help future readers.
 
Upvote 0
Sorry Peter, but I didn't think that my solution would be of any use. I keep different versions of the file I am working on and as it was almost the first thing I did when I arrived at work, I tried reverting to the previous version and that got rid of the error. Not sure what I did to initially cause the error.
 
Upvote 0
OK, but note for the future that 'Mark as solution' mark at the right of posts is for the solution post, not just that you have solved it and don't need any more help. You had marked post #2 as the solution when clearly it does not contain the solution to your question so I removed that mark.
 
Upvote 0
Alright. I am sorry I marked it as a solution. In future if that happens, I will not mark it. I just thought that i needed to let people know that a solution wasn't needed for that post.
 
Upvote 0
@dpaton05
If the code worked on another version and not the current one....there must be some differences either in the code / s OR the process in the worksheets.
Have you tried copying the Non Working code to the version that does work and see if it works there, that would then eliminate the error being / not being in the code.
 
Upvote 0
I could try that next time it happens but I copied over the file that wouldn't work and I have no idea what I did in the first place to cause the error.
 
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top