misc >> User Input for a formula

by Ron Luzius » Wed, 20 Jun 2007 21:26:01 GMT

I am trying to get user input for a file name that will go into a formula.

I have tried variations of this but it is still a No Go. I am getting a 1004
error on the ActiveCell line.
Any help would be appreciated

Dim Message, Title
Dim File_Date As Date

Message = "Enter date of SAP A5 Term Results file (mmddyy format)" ' Set
prompt.
Title = "A5 Term File Date" ' Set title.
File_Date = InputBox(Message, Title) ' Display message, title.

Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC1,'C:\A5 Report\[SAP A5 Sev Results
'File_Date'.xls]Severance Date Errors'!R3C1:R1000C12,9,FALSE)"

End Sub




misc >> User Input for a formula

by Derek » Thu, 21 Jun 2007 13:45:44 GMT



Well this is just a guess but how about trying...

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC1,'C:\A5 Report\[SAP A5 Sev Results " & _
File_Date & ".xls]Severance Date Errors'!R3C1:R1000C12,9,FALSE)"

...instead.

Cheers