LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Macro doesn't work on UserInterfaceOnly-protected sheet

Shouldnt €˜UserInterfaceOnly:=True allow macros to change the sheet?

My worksheet has a Shape which moves to align with Column V when a macro is
run. It works while the sheet is unprotected but when its protected, the
macro fails (Run-time error 1004) even though protection was set for User
Interface Only.

The 'Protect' macro uses this code:
Sheets("Name").Protect Password:="password", UserInterfaceOnly:=True,
Contents:=True, DrawingObjects:=True

The 'Move' macro which aligns the drawing object selects it and uses this
code:
Selection.Left = .Columns("V").Left

I know I could add code at the beginning and end of €˜Move to Unprotect and
Protect the sheet, but I thought that with €˜UserInterfaceOnly:=True, I
should not need to do this?
--
Kasama
 
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
protected work sheet jinge Excel Discussion (Misc queries) 1 December 27th 08 10:29 PM
Protected work sheet Stuart Carnachan Excel Discussion (Misc queries) 0 August 30th 06 03:48 PM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Strange problems with setting hidden property of a range when sheet protected with UserInterfaceOnly [email protected] Excel Programming 2 June 6th 06 04:15 PM
Macro protected work sheet Henry Excel Programming 1 March 14th 06 11:35 PM


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