Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Enable code in a password protected worksheet

I have a spreadsheet that contains some VBA code linkled to some combo boxes.
I have digitally certified the file, so that I can run the code without
getting a warning once I open it. All works fine: I can open the file, and
use the combo boxes and the code beyound them.

Now, the problem is that I need to password protect this file. Once I put a
password to it, the code and the combo boxes do not work any more. When I
open the file, I am asked to enter the password, I put in the correct one,
the file opens correctly, but the combo boxes (and the code beyond them) do
not work.

Any ideas?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 492
Default Enable code in a password protected worksheet

Wrap your code with:-

Sheet1.Protect ("password")

'Your code here

Sheet1.Unprotect ("password")

or

Sheets("Sheet1").Protect("password")

Adjust the sheet name and password to suit

Regards,
Alan.

"Barattolo_67" wrote in message
...
I have a spreadsheet that contains some VBA code linkled to some combo
boxes.
I have digitally certified the file, so that I can run the code without
getting a warning once I open it. All works fine: I can open the file,
and
use the combo boxes and the code beyound them.

Now, the problem is that I need to password protect this file. Once I put
a
password to it, the code and the combo boxes do not work any more. When I
open the file, I am asked to enter the password, I put in the correct one,
the file opens correctly, but the combo boxes (and the code beyond them)
do
not work.

Any ideas?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Enable code in a password protected worksheet

Alain,

Thanks for this, but this is not what I need. I need Excel to ask the user
to enter a password before he/she can open the file at all. If the user
enters the right password, then the worksheet should open up and the codes
and the combo boxes should be enabled.

Best regards.

"Alan" wrote:

Wrap your code with:-

Sheet1.Protect ("password")

'Your code here

Sheet1.Unprotect ("password")

or

Sheets("Sheet1").Protect("password")

Adjust the sheet name and password to suit

Regards,
Alan.

"Barattolo_67" wrote in message
...
I have a spreadsheet that contains some VBA code linkled to some combo
boxes.
I have digitally certified the file, so that I can run the code without
getting a warning once I open it. All works fine: I can open the file,
and
use the combo boxes and the code beyound them.

Now, the problem is that I need to password protect this file. Once I put
a
password to it, the code and the combo boxes do not work any more. When I
open the file, I am asked to enter the password, I put in the correct one,
the file opens correctly, but the combo boxes (and the code beyond them)
do
not work.

Any ideas?

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Enable code in a password protected worksheet

P.S. I think this is a bug in Excel that Microsoft needs to fix.

"Barattolo_67" wrote:

Alain,

Thanks for this, but this is not what I need. I need Excel to ask the user
to enter a password before he/she can open the file at all. If the user
enters the right password, then the worksheet should open up and the codes
and the combo boxes should be enabled.

Best regards.

"Alan" wrote:

Wrap your code with:-

Sheet1.Protect ("password")

'Your code here

Sheet1.Unprotect ("password")

or

Sheets("Sheet1").Protect("password")

Adjust the sheet name and password to suit

Regards,
Alan.

"Barattolo_67" wrote in message
...
I have a spreadsheet that contains some VBA code linkled to some combo
boxes.
I have digitally certified the file, so that I can run the code without
getting a warning once I open it. All works fine: I can open the file,
and
use the combo boxes and the code beyound them.

Now, the problem is that I need to password protect this file. Once I put
a
password to it, the code and the combo boxes do not work any more. When I
open the file, I am asked to enter the password, I put in the correct one,
the file opens correctly, but the combo boxes (and the code beyond them)
do
not work.

Any ideas?

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
How to retrive password protected worksheet but forgot password? Laurie Excel Worksheet Functions 1 November 19th 09 09:42 PM
how to enable formula auditing in a protected worksheet? Theo Excel Worksheet Functions 2 January 13th 08 05:30 PM
Enable outlining in a protected worksheet johnb Excel Discussion (Misc queries) 8 October 12th 07 08:15 PM
enable autofilter in a protected worksheet in Excel 97 WooGHeR Excel Worksheet Functions 1 March 25th 05 04:44 PM
How to enable font color on protected worksheet? dlterry Excel Discussion (Misc queries) 3 January 28th 05 11:19 PM


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

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

About Us

"It's about Microsoft Excel"