LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 328
Default Error in Macro 2003

Hi

I have recorded a macro to define certain columns that a user can edit
within a range of a protected worksheet,, but the line keeps giving me an
error at the protection line (marked below with an asterisk) - Runtime error
'1004' Application-defined or object-defined error My Macro looks like this...

' editranges Macro
Sheets("Rep 1").Select
Range("A1").Select
*** ActiveSheet.Protection.alloweditranges.Add Title:="editranges", Range:= _
Range("E:E,G:G,K:K,M:M,O:O,Q:Q,S:S,T:T")
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingColumns:=True, AllowFormattingRows:=True,
AllowSorting:= _
True, AllowFiltering:=True
ActiveSheet.EnableSelection = xlNoRestrictions
Range("A1").Select

End Sub

Thanks in advance
 
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
VBA Error in Excel 2003 Mike Flory Excel Discussion (Misc queries) 14 April 4th 23 10:34 AM
Macro error after switching from Excel 2000 to Excel 2003 Jake Burnham Excel Discussion (Misc queries) 1 January 10th 06 08:10 PM
error in excel 2003 namrata Excel Discussion (Misc queries) 2 June 10th 05 05:27 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM


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