Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have an Excel 2007 worksheet that has autofilters and macros assigned to option buttons in a Group Box that carry out some of the filtering. One button is the ShowAllData button that removes the filter. If the ShowAllData button is selected and then selected again (before any other button in the group is selected) I get a Run Time Error that the ShowAllData method of worksheet class failed. How do I prevent this error? I'm very new to VB. The code below is what I'm having trouble with. Thanks, Jim Sub UnhideBlanks() ' ' UnhideBlanks Macro ' ActiveSheet.Unprotect Password:="sivle" If ActiveSheet.AutoFilterMode = True Then ActiveSheet.ShowAllData ElseIf ActiveSheet.AutoFilterMode = False Then Else ActiveSheet.Protect Password:="sivle", DrawingObjects:=True, Contents:=True, Scenarios:=True _ , AllowSorting:=True, AllowFiltering:=True End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select method failing | Excel Programming | |||
copy method of object failing | Excel Programming | |||
Select Method Failing | Excel Programming | |||
Publish method failing, can't understand why | Excel Programming | |||
add method of validation failing | Excel Programming |