Open but not activate
I think the problem is that you are trying to activate by path and name, not
just name
Try
' fname is the (SLAVE) workbook
fname = Application.GetSaveAsFilename
ActiveWorkbook.SaveAs Filename:=fname
fShortName = ACtiveworkbook.Name
Workbooks.Open "MASTER"
Workbooks(fShortName).Activate
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"Craig McK" wrote in message
...
Hi
Is it possible to open a workbook, but not activate it
My problem is that I need to open a workbook to get data from (MASTER),
but
I then need to open (SLAVE) again to get the criteria from, but (SLAVE)
has
not been saved at this point. I tried to save the (SLAVE), but with no
luck
as follows
' fname is the (SLAVE) workbook
fname = Application.GetSaveAsFilename
ActiveWorkbook.SaveAs Filename:=fname
Workbooks.Open "MASTER"
Workbooks(fname).Activate
Thanks
|