Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
enginguven
 
Posts: n/a
Default How can I lock worksheets while still allowing macros to operate?

When I lock the worksheets that macros should enter into while operating, I
get an error message. Then macros couldn't of course work properly. How can I
lock the worksheets and macros can still operate?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default How can I lock worksheets while still allowing macros to operate?

Hi Enginguven,

Setting the Protect method's UserInterfaceOnly parameter to true enables vba
manipulation of the protected sheet.

However, this setting is not persistent and needs to be reset each time the
workbook is opened.

Perhaps, therefore, you could set protection in the Workbook_Open or
Auto_Open procedures, e.g.:

'=========
Sub Auto_Open()
With Worksheets("sheet1")
.Protect Password:="drowssap", UserInterfaceOnly:=True
End With
End Sub
'<<=========


---
Regards,
Norman


"enginguven" wrote in message
...
When I lock the worksheets that macros should enter into while operating,
I
get an error message. Then macros couldn't of course work properly. How
can I
lock the worksheets and macros can still operate?



  #3   Report Post  
Posted to microsoft.public.excel.misc
NUMBnut
 
Posts: n/a
Default How can I lock worksheets while still allowing macros to operate?

Right click unto your macros and choose to format it. You should have a
protection tab, and de-select the lock box. If not go to the properties
under the right click. You should get another window, and it will have a
"lock" row, choose to make the lock feature "false".

"enginguven" wrote:

When I lock the worksheets that macros should enter into while operating, I
get an error message. Then macros couldn't of course work properly. How can I
lock the worksheets and macros can still operate?

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 can I lock worksheets while still allowing macros to operate? enginguven Excel Discussion (Misc queries) 1 January 9th 06 09:47 PM
Hide worksheets if macros are disable Eintsein_mc2 Excel Discussion (Misc queries) 2 September 17th 05 07:37 PM
macros affecting different worksheets CJW Excel Discussion (Misc queries) 1 September 2nd 05 04:29 PM
Unhide Worksheets (hidden via macros) Mark Excel Discussion (Misc queries) 1 June 7th 05 05:21 PM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


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