您可以取消隱藏他們繞過任何限制的隱藏工作表沒有用戶意識到它,做你需要的任何東西,然後再把它們隱藏起來。
此示例假定Sheet2處於隱藏狀態。
Sub DoStuffToAHiddenSheetWithoutTheUserKnowingIt()
'turns off screen repainting so the user can't see what you're doing
'incidentally, this dramatically speeds up processing of your code
Application.ScreenUpdating = False
'note that if you're stepping through your code, screenupdating will be true anyway
'unhide the sheet you want to work with
Sheets("sheet2").Visible = True
'do whatever you want here, including selecting cells if you want
'Scagnelli is right though, only select cells if you have to
'when you're finished, hide the sheet again
Sheets("sheet2").Visible = False
'make sure you turn screenupdating back on, or Excel will be useless
Application.ScreenUpdating = True
End Sub
,如果你想你的牀單隱藏的另一個有用的技巧是將它們設置爲xlVeryHidden,這將防止它們被列在用戶如果他們試圖通過菜單或功能區取消隱藏它們。
您可以詳細說明如何打開工作簿並使其不可見嗎? – 2009-05-21 16:48:57