How to change data in a formula
dim fName as string
fname = InputBox("Please enter the filename", "File Name", "log.xls")
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(VLOOKUP(RC[-8],'N:\1._Document_Version_Control_Log
\Logs\" & fname & "'!DirName,1,FALSE)),""This is a new or modified
Dir "",""Not a new Dir"")"
This does not do anything to check that what they entered is valid.
Peter Richardson
" wrote:
Here is s snip of the code that I want to be able to enter a variable
into via a Input Box for the user to enter.
The piece I want to enter is the 20070904log.xls bit as this changes
on a daily basis.
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(VLOOKUP(RC[-8],'N:\1._Document_Version_Control_Log
\Logs\20070904Log.xls'!DirName,1,FALSE)),""This is a new or modified
Dir "",""Not a new Dir"")"
So any (polite!) suggestions would be welcome.
Thank you
Mark
|