![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
I could've sworn this has been covered before but I did a search and didn't bring up anything.
I have this on a workbook already but when I add the same code to another workbook I get an error. Do you have to have one sheet active before you can hide another one? I want to hide a sheet, my workbook contains only one sheet, the sheet I want to hide but I get an error with the code I am using. I want the sheet to be hidden on open or activation with a userform to ask for a password before viewing the hidden sheet. I did this with a workbook with three sheets and was able to hide sheet2 but when I added another sheet to the workbook I'm working on the code wouldn't work. Any ideas? Here's the code: Sheets("Sheet1").columns.rows.hidden = true Userform1.show Userform1 commandbutton click_event code: If TextBox1.text = "password" then Sheets("Sheet1").columns.rows.hidden = false Unload userform1 Sheet1.Activate end if Thanks, _________________ Soon I hope to be answering alot of these questions instead of asking them. viper [ This Message was edited by: viper on 2002-05-23 21:51 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi,
It's not an answer for your question, how about this? http://www.mrexcel.com/board/viewtop...c=8210&forum=2 |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
Thanks colo,
Worked okay.
__________________
I appreciate the help from everyone at Mr. Excel. viper |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|