Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default VBAProject Protect

The following code is present in a subroutine in a
standard module.

Sheets("NEXTRECORD").Visible = xlVeryHidden

No problem as long as the VBAProject is not protected.

What code would I use to protect and unprotect the
VBAProject?

Thanks in advance.


Kevin
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBAProject Protect

Hiding a sheet shouldn't be affected by project protection. It would be
affected if the workbook structure is protected.

--
Regards,
Tom Ogilvy

"Kevin" wrote in message
...
The following code is present in a subroutine in a
standard module.

Sheets("NEXTRECORD").Visible = xlVeryHidden

No problem as long as the VBAProject is not protected.

What code would I use to protect and unprotect the
VBAProject?

Thanks in advance.


Kevin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default VBAProject Protect

Thanks Tom.

Yes, the Workbook is protected. The VBA code also
includes,
Workbooks(WorkbookName).Protect Password:=DwgNumLogPwd
where WorkbookName is set to,
WorkbookName = Sheets("INPUTDATA").Range _
("strFileName").Value
in a separate module.

Mea culpa.

Kevin
-----Original Message-----
Hiding a sheet shouldn't be affected by project

protection. It would be
affected if the workbook structure is protected.

--
Regards,
Tom Ogilvy

"Kevin" wrote in

message
...
The following code is present in a subroutine in a
standard module.

Sheets("NEXTRECORD").Visible = xlVeryHidden

No problem as long as the VBAProject is not protected.

What code would I use to protect and unprotect the
VBAProject?

Thanks in advance.


Kevin



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default VBAProject Protect

Problem resolved.
I realize I don't need to protect/unprotect the VBAProject.
A simple,
Workbooks(Name).UnProtect Password:=DwgNumLogPwd
<code
Workbooks(Name).Protect Password:=DwgNumLogPwd
works.

Kevin
-----Original Message-----
Thanks Tom.

Yes, the Workbook is protected. The VBA code also
includes,
Workbooks(WorkbookName).Protect

Password:=DwgNumLogPwd
where WorkbookName is set to,
WorkbookName = Sheets("INPUTDATA").Range _
("strFileName").Value
in a separate module.

Mea culpa.

Kevin
-----Original Message-----
Hiding a sheet shouldn't be affected by project

protection. It would be
affected if the workbook structure is protected.

--
Regards,
Tom Ogilvy

"Kevin" wrote in

message
...
The following code is present in a subroutine in a
standard module.

Sheets("NEXTRECORD").Visible = xlVeryHidden

No problem as long as the VBAProject is not protected.

What code would I use to protect and unprotect the
VBAProject?

Thanks in advance.


Kevin



.

.

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
Cracking VBAProject Password Lacty Excel Discussion (Misc queries) 1 May 16th 10 10:50 AM
How with VBA, can I activate one of many modules in a VBAProject? [email protected] Excel Discussion (Misc queries) 1 January 17th 07 02:08 AM
VBAProject Andy Excel Worksheet Functions 1 January 10th 05 02:53 PM
code in VBAProject will not run Mike[_58_] Excel Programming 2 November 9th 03 04:08 PM
How to Delete a VBAProject JStone0218 Excel Programming 1 November 8th 03 02:47 PM


All times are GMT +1. The time now is 05:51 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"