Reply (from a previouspostin) courtesy of Ron De Bruin:
You can use the workbook open event to run the code
http://www.cpearson.com/excel/events.htm
Then you can open the workbook like this
If bIsBookOpen("test.xls") Then
Set destWB = Workbooks("test.xls")
Else
Set destWB = Workbooks.Open("c:\test.xls")
End If
Copy this function in a normal module
Function bIsBookOpen(ByRef szBookName As String) As Boolean
' Rob Bovey
On Error Resume Next
bIsBookOpen = Not (Application.Workbooks(szBookName) Is Nothing)
End Function
Re printing - I don't believe you can.
"Brettjg" wrote:
I can't find anything in Help on this. When I open workbook "A" I want to
know if workbook "B" is already open because I'll do something in "A" as it
opens if that is the case.
The other thing I'd really like to know is if you can print from a workbook
that is not open.
Can anyone help please?