Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro on Protected sheet

G'Day MVPs, OfficeXP Excel question:

My spreadsheet will manually sort fine when it is protected but when
the same sort is attempted via a macro it reports a protection
conflict error. How can I workaround this problem?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Macro on Protected sheet

Hi Ryton,

Sheets("Sheet 1").Unprotect
"Your code"
Sheets("Sheet 1").Protect

This will unprotect the sheet, run your macro, then protect the sheet again.
Of course, change the Sheet 1 name to your sheet name.

Alan

"The only dumb question is the question left unasked."


"Ryton" wrote in message
ps.com...
G'Day MVPs, OfficeXP Excel question:

My spreadsheet will manually sort fine when it is protected but when
the same sort is attempted via a macro it reports a protection
conflict error. How can I workaround this problem?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro on Protected sheet

Thanks Alan!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 116
Default Macro on Protected sheet

Glad to help.


"Ryton" wrote in message
oups.com...
Thanks Alan!



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
Macro & Protected sheet Lise Excel Discussion (Misc queries) 2 April 11th 10 10:36 PM
How to get a macro to run that uses a protected sheet MPM Excel Programming 3 November 17th 05 05:50 PM
use macro on a protected sheet das.s.k Excel Programming 2 March 14th 05 07:57 PM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM
Using a Macro with the sheet protected. Jason Watts Excel Programming 1 January 6th 04 09:31 PM


All times are GMT +1. The time now is 09:25 AM.

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"