Thread: vba-showalldata
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claude Claude is offline
external usenet poster
 
Posts: 36
Default vba-showalldata

I solved the same problem as follows:

On Error Resume Next
Worksheets("sheet1").ShowAllData
On Error GoTo 0

-----Original Message-----

I have a question i cannot solve.

I have some columns set up with filters.

I just added a line into my code to show all the data

before the rest
of the code was read because i found that if the data was

filtered,
only the selected data from the filter(the activesheet)

was edited with
the program.

My solution was to add this line :
Worksheets("sheet1").ShowAllData

I have found that when somebody has NOT selected a filter

before
running this macro that i have written, they now get an

error . Instead
of using the line that i wrote, Is there a way to make

the program look
at all the data, even the filtered out data if the filter

is in use?
here is my little subprogram:

Sub commandbutton2_Click()
Dim answer As Variant


Worksheets(1).ShowAllData
Worksheets(1).Cells.Font.ColorIndex =

xlColorIndexAutomatic
Worksheets(1).Interior.ColorIndex = xlColorIndexNone
Worksheets(1).Range(Cells(3, "D"), Cells

(700, "P")).Font.Bold = False
'these previous lines get rid of all the cell shading

etc. the
reason being is because some of the called subroutines

will ignore
cells with shading or bolding.

Call calc_mean
Call grubbs
Call recalc_meanstdev
Call confidence_interval
Call expected_limits
Call decimalplace



End Sub


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step

guide to creating financial statements
.