Thread: Hiding Sheets
View Single Post
  #3   Report Post  
Rain
 
Posts: n/a
Default

Hi Norman,

It seems to fail on just selecting the hidden sheet. I'm selecting the
sheet before pasting data on it so that I can format the data and do some
math on it.

Code excerpt:
----------------
Sub Macro1(strSheet As String)

If strSheet = "Select Car" Then
Sheets(strSheet).Select
Columns(strCol).Select
Selection.Copy
Range("A1").Select
*** Sheets("Sheet2").Select
Range("A1").Select
ActiveSheet.Paste
Columns("B:B").Select
...
...
...
End Sub

The error that I get is:
Run-time error '1004': Select method of Worksheet class failed

TIA

"Norman Jones" wrote:

Hi Rain,

There should normally be no problem formatting cells or hiding / unhiding
rows or columns on a hidden sheet.

If you post your code or a portion thereof which fails, perhaps more
constructive help can be offered



---
Regards,
Norman



"Rain" wrote in message
...
Hi,

I am writing an application using Excel + VBA. I am doing a lot of
calculation on data on one of the worksheets and I wish to have this sheet
hidden. While calculating, I also format some of the columns and delete
some
columns.

It seems like Excel dosen't like this sheet to be hidden. Any reason? Or
should I do something else?

TIA