Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default unable to have workbook protect

dear all, with protect statement but i got the error message
"unable to set the visible property of worksheet class"
actually i want to disallow user to add/delete/resequence the
worksheet in the workbook but the visibility of the sheet is
controlled by scripts.
how? pls help.

another issue is why i cannot make a reply to the forum? the site
saying that my password is invalid but why i can create new message?


Private Sub Workbook_Open()

ActiveWorkbook.Protect Structu=True, Windows:=False

Sheets(2).Visible = True
Sheet2.CommandButtonDESB.Visible = False
Sheet2.CommandButtonKNDP.Visible = False
Sheet2.Label1.Visible = False
Sheet2.Label2.Visible = False

Sheets(1).Visible = False
Sheets(3).Visible = False
Sheets(4).Visible = False

Sheet2.CommandButton1.Visible = True
Sheet2.Label9.Visible = True

ThisWorkbook.Saved = True

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default unable to have workbook protect

"tango" skrev i melding
om...
dear all, with protect statement but i got the error message
"unable to set the visible property of worksheet class"


You can't hide/show sheets in a protected workbook, so the code must
unprotect -show/hide -reprotect.

another issue is why i cannot make a reply to the forum? the site
saying that my password is invalid but why i can create new message?


This is not s forum, ithis is a usenet newsgroup that you may be accessing
from some website frontend. Connect directly with Outlook Express or a
similar newsreader. See http://www.mvps.org/dmcritchie/ie/oe6nws01.htm

HTH. Best wishes Harald


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to password-protect "VeryHidden" worksheet exalan New Users to Excel 4 May 9th 09 08:13 AM
unable to protect cells in macro sheet b/c runtime error 1004 rldjda Excel Worksheet Functions 1 March 20th 08 08:28 PM
Protect Workbook Vs Protect Sheet Poor_pakistani New Users to Excel 4 May 25th 06 02:06 PM
Protect Sheet but enable cell ranges giving Error 1004 Unable to set William[_4_] Excel Programming 3 August 11th 04 09:09 PM
Unable cut in workbook Andre[_2_] Excel Programming 1 March 6th 04 09:30 AM


All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"