![]() |
|
#1
|
|||
|
|||
|
I recorded a macro which suppose to unhide all hiden columns, and clear all filters. When i run macro everything is ok, but if i run it again i get message: Run-time error "1004":
ShowAllData method of Worksheet class failed How to avoid that? |
|
#2
|
||||
|
||||
|
Please post the code you are using. It's impossible to say what the issue is without seeing it.
PS: When posting code, please use the code tags. They're on the 'Go Advanced' tab.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Hope i doing right.
Here is my code Sub Macro1() ' ' Macro1 Macro ' ' Cells.Select Selection.EntireColumn.Hidden = False ActiveSheet.ShowAllData Range("C1:E1").Select End Sub |
|
#4
|
||||
|
||||
|
Try:
Code:
Sub Demo() On Error Resume Next ActiveWorkbook.ActiveSheet.ShowAllData = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#5
|
|||
|
|||
|
Thank you, thank you,
it works!!! |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Problem with macro
|
tmill29 | Excel Programming | 1 | 06-08-2013 09:59 AM |
Moving data macro problem
|
MattMurdock | Excel Programming | 1 | 07-20-2012 04:49 AM |
Another simple macro problem
|
Ulodesk | Word VBA | 1 | 06-08-2012 06:24 PM |
Interesting hyperlink macro problem
|
DobberHockey | Word VBA | 7 | 03-26-2012 09:26 PM |
| Problem with AutoClose macro and Word 2003 | cholo | Word VBA | 0 | 07-08-2009 05:48 AM |