I have a spreadsheet that opens an excel file based on the value in a given cell. This works fine. However, I need to pass data from my form to this newly opened file. I can't seem to get this file to become the active workbook so I can complete my paste action. I mind you, the file is already open...so I'm rather puzzled why this isn't working.
I have to call the file based on a variable, as the file names always change.
sub macro23()
Windows("Recon Builder Beta2.xls").Activate
Sheets("Purchase Recon").Select
Range("L3:L4").copy
purchfile = Range("k1").Value
Windows.Activate Filename:=purchfile
Sheets("Recon").Select
Range("L3:L4").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
end sub
Thanks, JS
Bookmarks