Okay so I thought I was on a roll today (not needed to post all day, ha)
Im transferring an Excel formula from Access-Excel, however VBA thinks I am using the ' to comment out part of the code.
The Code:
As soon as I go on the to next line of code VBA changes the above slightly to this:
Which causes half the formula to comment itself out, there has to be a way around this?
Im transferring an Excel formula from Access-Excel, however VBA thinks I am using the ' to comment out part of the code.
The Code:
Code:
ActiveCell.FormulaR1C1 = _
"=VLOOKUP($A2,INDIRECT("'"&Index!B2&"'!"&"A2:D1000"),2,FALSE)"
Code:
ActiveCell.FormulaR1C1 = _
"=VLOOKUP($A2,INDIRECT(" ' "&Index!B2&"'!"&"A2:D1000"),2,FALSE)"