I'm fairly new to VBA, so forgive my obvious beginner's errors. I'm looking to create a macro that will return a formula reference to a cell in another sheet. I have the below code. It almost does what I want, but it returns the following: =@'Jobs and pricing info'!'E9' and the next one =@'Jobs and pricing info'!'E10' and so on. I don't understand why there's an @ at the beginning and why it puts the single quotes around the E9. Please help!
Sub LinkCells()
Sheets("Direct Labor").Select
Range("E122").Select
ActiveCell.FormulaR1C1 = "='Jobs and pricing info'!E9"
ActiveCell.Offset(145).Select
Dim x As Integer
For x = 1 To 199
ActiveCell.FormulaR1C1 = "='Jobs and pricing info'!E" & (9 + x)
ActiveCell.Offset(145).Select
Next x
End Sub
Sub LinkCells()
Sheets("Direct Labor").Select
Range("E122").Select
ActiveCell.FormulaR1C1 = "='Jobs and pricing info'!E9"
ActiveCell.Offset(145).Select
Dim x As Integer
For x = 1 To 199
ActiveCell.FormulaR1C1 = "='Jobs and pricing info'!E" & (9 + x)
ActiveCell.Offset(145).Select
Next x
End Sub