#1
|
|||
|
|||
Run Time Error 424 - Object Required
I have a toggle button in my spreadsheet that has become "inactive". Nothing happens when I click it. When I view the code (shown below) and hit F5, I get a Run Time Error 424 - Object Required error message. This macro has worked in the past. Also, this issue is occurring on multiple spreadsheets that also have toggle buttons, although the code is different in the other spreadsheets.
It appears that something has happened in Excel to cause this problem because it's occurring in different Excel files with different 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 ActiveSheet.Range("$B$6:$N$319").AutoFilter Field:=4, Criteria1:="<>" Range("A1").Select Else 'This area contains the things you want to happen 'when the toggle button is depressed ActiveSheet.ShowAllData Range("A1").Select End If End Sub |
#2
|
||||
|
||||
Interesting! I noticed the very same thing over the weekend with some buttons in a worksheet I've used for a few years, now. All they do is sort the worksheet on various columns, but they've suddenly stopped working—stopped doing anything at all, that I can see. I didn't think to try using <F5> on them, though.
I've an hypothesis that they actually stopped working when I switched to Excel 2010, only I didn't notice it because I don't use those buttons very much. By any chance would that fit your situation? I'm wondering whether I need only redefine the buttons to make them work. Maybe between the two of us we can figure this out and discover that the cause is the same for both of us. |
#3
|
||||
|
||||
I just went into Design mode and looked at the Properties, and I see that even when I click on the buttons, all the properties window shows is the worksheet itself. Looks like the buttons have disappeared, from Excel's point of view. How about you?
|
#4
|
||||
|
||||
I just did a little googling and found this article, apparently from Microsoft, entitled "Form Controls stop working after December 2014 Updates". Sounds like your problem and maybe mine (although symptoms vary), and they offer a handful of workarounds while they're trying to find a solution. Apparently this happened after the 2014-12-09 security patch.
|
#5
|
|||
|
|||
Yes, that does appear to be the culprit. But that solution looks awfully complicated. BTW, I use Excel 2013.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
Run-time error 91 object variable or with block variable not set | JUST ME | Word VBA | 4 | 03-25-2014 06:56 AM |
Run-time error '91': Object variable or With block variable not set | tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |
vba error (object required) for highlight vowels | gsrikanth | Word VBA | 1 | 04-22-2012 08:55 PM |
vba error (object required) for highlight vowels | gsrikanth | Excel Programming | 1 | 04-18-2012 01:06 AM |