|Subject:||HELP!! Unhide Sheet with Macro and focus on other sheet|
|Date:||23 May 2006|
I have 2 sheets in a workbook. I'd like one to be hidden, and then
have the user press a command button to run a macro to:
1. unhide the hidden sheet
2. Copy some cells on the hidden sheet to another location on the
3. Rehide the sheet
4. Clear some cells on the remaining (un-hidden) sheet.
The code is below.
' Unhide the totals, copy NEW YTD to Curr YTD for next week start
Sheets("Depts and LW").Visible = True
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
' Hide the YTD sheet
ActiveWindow.SelectedSheets.Visible = False
' Activate Week Sheet and clear the data entered on the tracking sheet
The problem is:
1. Sheet is unhidden, fine.
2. When the next line executes ( Range("D9").Select ) it is
selecting in the Original, UNhidden worksheet. (I added the Selec of
D9 when the select of H3 didn't work.
Can anyone HELP???? Please??? I am at a total loss here.