Hi All,
I have a macro which opens another workbook,
I want to then reactivate the original work book to enter in a vlookup formula.
I have managed to make it work, but it only works for a worksheet of a "fixed name"...
Is there a way to dynamically reactiveate the original worksheet?
or in other words, activate the worksheet the macro resides in?
(as the macro is to be imported into the spreadsheet in question).
Thanks very much!!!
I have a macro which opens another workbook,
I want to then reactivate the original work book to enter in a vlookup formula.
I have managed to make it work, but it only works for a worksheet of a "fixed name"...
Is there a way to dynamically reactiveate the original worksheet?
or in other words, activate the worksheet the macro resides in?
(as the macro is to be imported into the spreadsheet in question).
Code:
Workbooks.Open Filename:="location\filename"
Windows("fixed name").Activate
Range("J2").Select
Range("I2", Range("i" & Rows.Count).End(xlUp)).Offset(0, 1).Formula = "=VLOOKUP(RC[-9],filename!C3:C5,3,FALSE)"
Thanks very much!!!