LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Run-time Error '1004'

I don't see red in the NGs.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"SamuelT" wrote in
message ...

Thanks Bob.

Just tried to run the macro. I get a 'syntax error' on the line
coloured red.

Sub TeamChange()
Const sOtherBook As String = "Services Synergy 2 - Sell RAC_BSM to NUGI
Base.xls "

ActiveSheet.Unprotect
Windows("Monthly Status Report Template v.2.0.xls").Activate
With Workbooks(sOtherBook)
Worksheets("Teams").Unprotect
Selection.Copy .Worksheets(1).Range("F1")
Names.Add Name:="team", _
RefersToR1C1:="=Teams!R1C1:R1C18"
Range("A1:R19").CreateNames Top:=True
Names.Add Name:="look_up", _
RefersToR1C1:="=Teams!R164C1:R262C5"
Sheets("Resources").Select
With .Range("B6").Validation
Delete
Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:= _
xlBetween, Formula1:="=team"
ShowInput = True
ShowError = True
End With
Range("B6").AutoFill Destination:=.Range("B6:B102"),
Type:=xlFillDefault
Range("T6").FormulaR1C1 = "=VLOOKUP(RC3,look_up,2,FALSE)"
Range("T6").AutoFill Destination:=.Range("T6:W6"),
Type:=xlFillDefault
Range("T6:W6").AutoFill Destination:=.Range("T6:W102"),
Type:=xlFillDefault
Range("C102").ClearContents
Range("B102").ClearContents
Sheets("Teams").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True
End With
End Sub

Cheers,

SamuelT


--
SamuelT
------------------------------------------------------------------------
SamuelT's Profile:

http://www.excelforum.com/member.php...o&userid=27501
View this thread: http://www.excelforum.com/showthread...hreadid=504822



 
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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM


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