Hi

I have a piece of code that I need help with.

I have recorded a macro that uses information extracted from a worksheet that is named in the following format :" LN Disputes 08 Nov 2012.xls "

Firstly, I want the macro to open the file created on the last business day, i.e. T-1 or open Friday's sheet on a Monday. Can you advise what function I can use? I believe there is a last business day function...

Secondly, I reference yesterday's business day within a vlookup that is in the macro (see below). What code can I use to ensure yesterday's business day file is being referenced in the vlookup?


ActiveCell.FormulaR1C1 =
"=VLOOKUP(RC[-6]:R[19]C[-6],'[LN Disputes 08 Nov 2012.xls]EOD Dispute

Thanks