Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Damien
 
Posts: n/a
Default Unprotect Code Module in Code

Can you protect / unprotect a VBA code module in code? eg

ActiveWorkbook.VBProject.VBComponents("Module1").P roperties("Password") =
"test"

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default Unprotect Code Module in Code

You can't protect a single VBComponent. You can protect only the
entire project, and this cannot be done with VBA (unless you
resort to the dreaded SendKeys).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Damien" wrote in message
...
Can you protect / unprotect a VBA code module in code? eg

ActiveWorkbook.VBProject.VBComponents("Module1").P roperties("Password")
=
"test"

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
Damien
 
Posts: n/a
Default Unprotect Code Module in Code

OK Chip,

have you got any examples of doing that with SendKeys? I could try and work
it out but if it's already been done ...

"Chip Pearson" wrote:

You can't protect a single VBComponent. You can protect only the
entire project, and this cannot be done with VBA (unless you
resort to the dreaded SendKeys).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Damien" wrote in message
...
Can you protect / unprotect a VBA code module in code? eg

ActiveWorkbook.VBProject.VBComponents("Module1").P roperties("Password")
=
"test"

Thanks




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
Where?Worksheet code module or Worksheet_SelectionChange event han Kenzie Excel Worksheet Functions 4 January 30th 06 09:41 PM
Help, need to speed up this macro retseort Excel Discussion (Misc queries) 3 January 12th 06 12:33 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
programming VBE - Deleting All Code From A Module pm Excel Discussion (Misc queries) 4 December 31st 05 01:21 AM
Make Change Case in Excel a format rather than formula Kevin Excel Worksheet Functions 1 March 18th 05 08:53 PM


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