Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I intend to work on an opened workbook using Macro in another workbook. The
code I use is: Dim wk as Workbook Set wk=Workbooks.open("c:\a.xls") It works when a.xls is closed. But when it is opened. I got a messgae "The workbook is already Opened". Does anyone know how? Thanks. -- I like Vb. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim wk as Workbook
On Error Resume Next set wk = workbooks("a.xls") On Error goto 0 if wk is nothing then Set wk=Workbooks.open("c:\a.xls") End if msgbox wk.Name ' wk now is a reference to a.xls regardless -- Regards, Tom Ogilvy "Jiao" wrote in message ... I intend to work on an opened workbook using Macro in another workbook. The code I use is: Dim wk as Workbook Set wk=Workbooks.open("c:\a.xls") It works when a.xls is closed. But when it is opened. I got a messgae "The workbook is already Opened". Does anyone know how? Thanks. -- I like Vb. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming | |||
Sheets select method fails when workbook is opened by another workbook | Excel Programming |