Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Excel protection & macros

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?


Thanks in advance,

Neil
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Excel protection & macros

You have to turn off protection, run code, then turn it back on all through
code. Just record a macro of you protecting the sheet, then unprotect it.
Look at the code that is created in the module and you will see what it takes
to unprotect. Put the unprotect at the beginning and the protect at the end.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Neil Pearce" wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?


Thanks in advance,

Neil

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Excel protection & macros

That has worked well John, thank-you. However this doesn't enable me to set
a password within the workbook thereby others may still alter the
spreadsheet.

Is there a way to enable Macros to run if a set a password is imputted when
protection the workbook?

"John Bundy" wrote:

You have to turn off protection, run code, then turn it back on all through
code. Just record a macro of you protecting the sheet, then unprotect it.
Look at the code that is created in the module and you will see what it takes
to unprotect. Put the unprotect at the beginning and the protect at the end.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"Neil Pearce" wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?


Thanks in advance,

Neil

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel protection & macros

Do the macros not even start or do they start and fail?

If they don't start, make sure your users are enabling macros when they open
your workbook.

If they start and then fail, then you may be trying to do stuff that isn't
allowed on a protected worksheet.

If that's the case, you can unprotect the worksheet at the top of your macro, do
the work and then reprotect the worksheet right before your macro ends.

Neil Pearce wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?

Thanks in advance,

Neil


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Excel protection & macros

That has worked well Dave, thank-you. However this doesn't enable me to set
a password within the workbook thereby others may still alter the
spreadsheet. Is there a list somewhere of what is allowed and not allowed
when the spreadsheet is protected?

Is there a way to enable Macros to run if a set a password is inputted when
protection the workbook?


"Dave Peterson" wrote:

Do the macros not even start or do they start and fail?

If they don't start, make sure your users are enabling macros when they open
your workbook.

If they start and then fail, then you may be trying to do stuff that isn't
allowed on a protected worksheet.

If that's the case, you can unprotect the worksheet at the top of your macro, do
the work and then reprotect the worksheet right before your macro ends.

Neil Pearce wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?

Thanks in advance,

Neil


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Excel protection & macros

I don't understand.

If you have a worksheet protected, then you know the password. And I would
guess that you have both locked and unlocked cells in that worksheet.

The users should be able to change the unlocked cells on that protected sheet
with no problems.



Neil Pearce wrote:

That has worked well Dave, thank-you. However this doesn't enable me to set
a password within the workbook thereby others may still alter the
spreadsheet. Is there a list somewhere of what is allowed and not allowed
when the spreadsheet is protected?

Is there a way to enable Macros to run if a set a password is inputted when
protection the workbook?

"Dave Peterson" wrote:

Do the macros not even start or do they start and fail?

If they don't start, make sure your users are enabling macros when they open
your workbook.

If they start and then fail, then you may be trying to do stuff that isn't
allowed on a protected worksheet.

If that's the case, you can unprotect the worksheet at the top of your macro, do
the work and then reprotect the worksheet right before your macro ends.

Neil Pearce wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?

Thanks in advance,

Neil


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel protection & macros

Neil

Maybe this..............?

Sub dothings()
ActiveSheet.Unprotect Password:="justme"
'your macro code to do things
ActiveSheet.Protect Password:="justme"
End Sub


Gord Dibben MS Excel MVP

On Wed, 13 Feb 2008 08:16:05 -0800, Neil Pearce
wrote:

That has worked well Dave, thank-you. However this doesn't enable me to set
a password within the workbook thereby others may still alter the
spreadsheet. Is there a list somewhere of what is allowed and not allowed
when the spreadsheet is protected?

Is there a way to enable Macros to run if a set a password is inputted when
protection the workbook?


"Dave Peterson" wrote:

Do the macros not even start or do they start and fail?

If they don't start, make sure your users are enabling macros when they open
your workbook.

If they start and then fail, then you may be trying to do stuff that isn't
allowed on a protected worksheet.

If that's the case, you can unprotect the worksheet at the top of your macro, do
the work and then reprotect the worksheet right before your macro ends.

Neil Pearce wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?

Thanks in advance,

Neil


--

Dave Peterson


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default Excel protection & macros

Perfect Gord, thank-you.

"Gord Dibben" wrote:

Neil

Maybe this..............?

Sub dothings()
ActiveSheet.Unprotect Password:="justme"
'your macro code to do things
ActiveSheet.Protect Password:="justme"
End Sub


Gord Dibben MS Excel MVP

On Wed, 13 Feb 2008 08:16:05 -0800, Neil Pearce
wrote:

That has worked well Dave, thank-you. However this doesn't enable me to set
a password within the workbook thereby others may still alter the
spreadsheet. Is there a list somewhere of what is allowed and not allowed
when the spreadsheet is protected?

Is there a way to enable Macros to run if a set a password is inputted when
protection the workbook?


"Dave Peterson" wrote:

Do the macros not even start or do they start and fail?

If they don't start, make sure your users are enabling macros when they open
your workbook.

If they start and then fail, then you may be trying to do stuff that isn't
allowed on a protected worksheet.

If that's the case, you can unprotect the worksheet at the top of your macro, do
the work and then reprotect the worksheet right before your macro ends.

Neil Pearce wrote:

Dear all,

I would like to protect my spreadsheet so that others might use it. However
when I do so the macros in the workbook do not run. I may select the button
that they are attached to but the marco itself doesn't run.

Which settings do I change to alter this situation?

Thanks in advance,

Neil

--

Dave Peterson



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
Cell/worksheet protection with macros enabled Zilla[_2_] Excel Worksheet Functions 7 March 6th 07 01:07 AM
Macros/Protection/Pivot Tables...HELP KDG Excel Discussion (Misc queries) 0 October 19th 06 08:45 PM
how to hide a list of macros in excel 2000 without password protection Padam Setting up and Configuration of Excel 1 July 12th 06 09:10 PM
how to hide a list of macros without password protection Padam Excel Worksheet Functions 1 July 12th 06 11:30 AM
macros and protection SYBS Excel Worksheet Functions 9 May 24th 06 06:52 PM


All times are GMT +1. The time now is 03:32 AM.

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"