Hello Gurus!
I have 2 opened workbooks - deswkb & srcwkb. deswkb is the activ
workbook
1) my code to hide deswkb (i thought):
deswkb.Application.ActiveWindow.Visible = False
problem:
if i run the code again, the macro will close next activewindow whic
is srcwkb.
Question:
Is there anyway that I could code to hide deswkb and did not have thi
kind of problem?
2) I failed to detect the hidden workbook by using following codes:
If IsBookOpen("c:\excel97\Database1.xls") Then
Set deswkb = Workbooks("c:\excel97\Database1.xls")
Else
Set deswkb = Workbooks.Open("c:\excel97\Database1.xls")
End If
____when IsBookOpen is :
Function IsBookOpen(ByRef szBookName As String) As Boolean
On Error Resume Next
IsBookOpen = Not (Application.Workbooks(szBookName) Is Nothing)
End Function
question:
Is there any way that I could code to detect it succesfully?
Any suggestions would be appreciated!
Tahnks, Jeani
--
Message posted from
http://www.ExcelForum.com