Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Error msg for "ShowAll"?

I have a button on a spreadsheet that accesses performs the "ShowAll"
function of:

ActiveSheet.ShowAllData

It works great unless all the data is present, of course. Rather than get
the 1004 error of:

"Run-time error '1004':

ShowAllData method of Worksheet class failed"

what can I add to the line of coding above, ActiveSheet.ShowAllData, to
alert the user that all the data is showing?

Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error msg for "ShowAll"?

Try:

On Error Resume Next
ActiveSheet.ShowAllData
If Err.Number < 0 Then Msgbox "All data is being shown"
On Error Goto 0



--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Error msg for "ShowAll"?


"kkknie " wrote in message
...
Try:

On Error Resume Next
ActiveSheet.ShowAllData
If Err.Number < 0 Then Msgbox "All data is being shown"
On Error Goto 0

K


Oh, thank you so much! This worked perfectly. I incorporated it into two
sheets.

Thanks!


Reply
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
"num#" errors .. how to average a group with a "num#" error Byron Excel Discussion (Misc queries) 3 May 20th 09 04:32 AM
"Document not saved" "error in loading DLL" Tracey L Excel Discussion (Misc queries) 0 December 1st 08 12:57 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Shortcut key for "Paste Options" and "Error Checking" buttons? johndog Excel Discussion (Misc queries) 1 October 6th 06 11:56 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 05:50 PM.

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

About Us

"It's about Microsoft Excel"