Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro adding quotation mark unwanted

Status
Not open for further replies.

tjonessi

Programmer
Jul 9, 2007
14
US
I have this macro
Sub test1()
Sheets("M32#1").Select
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Sheets("Efficiency").Select
Range("B3").Select
ActiveCell.FormulaR1C1 = "=+'M32#1'!A2"
End Sub

and this is the result I get: #NAME?
and the formula is this: =+'M32#1'!'A2'

Notice the quotation mark between A2. I don't want it there, what am I doing wrong?

Thanks.
TJonessi
 
Tou put a formula in A1 notation in the FormulaR1C1 property !
What about this ?
ActiveCell.Formula = "=+'M32#1'!A2"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top