zoom38
02-11-2006, 08:02 AM
I have a worksheet called "Tables" where there is no user input whatsoever. All of the operations on this worksheet are done by formula and macros. I protected the worksheet and entered "ActiveSheet.Protect UserInterfaceOnly:=True". This worked great. Next I tried hiding the "Tables" worksheet then activated the macro but I get a "Run-Time Error '1004': Select method of worksheet class failed." message. I selected debug and it took me to my main module which sets the "Tables" worksheet as active and calls a macro on this sheet. The debugger highlights the
"Sheets("Tables").Select" line.
Anyone have any ideas on how to fix this?
Thanks
Gary
Public Sub Main()
Dim rngStart As Range
Set rngStart = Selection
Sheets("Tables").Select
First_Shift_Sort
Flex_Shift_Sort
Second_Shift_Sort
SD_Sort
With rngStart
.Parent.Activate
.Select
End With
End Sub
"Sheets("Tables").Select" line.
Anyone have any ideas on how to fix this?
Thanks
Gary
Public Sub Main()
Dim rngStart As Range
Set rngStart = Selection
Sheets("Tables").Select
First_Shift_Sort
Flex_Shift_Sort
Second_Shift_Sort
SD_Sort
With rngStart
.Parent.Activate
.Select
End With
End Sub