R
rog
Hi,
I would like to modify an already open workbook from Word VBA.
I found this macro:
Sub Macro1()
Dim oXL As Excel.Application, oWB As Excel.Workbook
Set oXL = GetObject(, "Excel.Application")
Set oWB = oXL.Workbooks.Open("D:\workbook.xls")
'my code
End Sub
It works fine, but if the file "workbook.xls" is already open, I have
an error.
Is it possible to modify this macro, so i can control the file
"workbook.xls" when it's already open?
Thanks!
I would like to modify an already open workbook from Word VBA.
I found this macro:
Sub Macro1()
Dim oXL As Excel.Application, oWB As Excel.Workbook
Set oXL = GetObject(, "Excel.Application")
Set oWB = oXL.Workbooks.Open("D:\workbook.xls")
'my code
End Sub
It works fine, but if the file "workbook.xls" is already open, I have
an error.
Is it possible to modify this macro, so i can control the file
"workbook.xls" when it's already open?
Thanks!