LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default ShowAllData error

Hi All
(Excel 2003)

I'm using Advance filter on a week of data in
sheets("Week1").Range("A19:H148"), based on criteria in cells E17:E18 (E17 =
Blank, E18 = =E20<0).

At the end my macro I must "ShowAllData".

Sometimes there is no data to filter for a week and I get an error:
I still need to show the worksheet even though no weeks of data where found.

Error message:
"ShowAllData method of Worksheet class failed"

I tried including: Application.DisplayAlerts = False
but the error message still appears & stops the macro.

I also tried including the following - but still no joy

If ActiveSheet.FilterMode = True Then
ActiveSheet.ShowAllData
End If

Can anyone tell me what code I need to do two things:

- Don't show the error message or stop the macro when ShowAllData fails,
BUT
- type the text "NO NEW ACTIVITY" in cell D20 on the current worksheet
before continuing with the macro

--
Thank for your help
BeSmart

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with funtion ShowAllData oscar_acm Excel Programming 0 August 11th 06 12:04 AM
Troubles with ActiveSheet.ShowAllData [email protected] Excel Programming 3 June 1st 06 02:50 PM
ShowAllData Pat Excel Discussion (Misc queries) 3 April 14th 05 10:08 PM
ShowAllData in all workbooks and sheets Robert Christie[_3_] Excel Programming 2 January 29th 05 03:29 PM
vba-showalldata chick-racer[_45_] Excel Programming 7 December 5th 03 09:00 PM


All times are GMT +1. The time now is 08:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"