Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks bob
Would have been there for a while trying to work that one out Craig "Bob Phillips" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't seem to activate an open workbook | Excel Discussion (Misc queries) | |||
how to Activate the previous Open, workbook..? | Excel Programming | |||
How to auto activate macro when file open ? | Excel Worksheet Functions | |||
open and activate workbook? | Excel Programming | |||
Excel VBA - Activate Open Workbooks to format | Excel Programming |