make workbook visible
Hi Jacob,
I found the trick.
Since the file still hide in the window as invisible no matter when it is
opened by macro or manually, Firstly I opened it manually(it is invisible),
then unhide it from window, then file show up on window as visible, I saved,
closed, then the file back to normal. So now I can open this file manully
from directory path and able to alter contents. Thanks again for your help
and my problem is solved now.
Regards
"Jacob Skaria" wrote:
The code is to be placed within the BeforeClose event of your workbook.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim wb As Workbook
For Each wb In Workbooks
If wb.Name < ThisWorkbook.Name Then wb.Close False
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Jacob Skaria" wrote:
Try the below
Dim wb As Workbook
For Each wb In Workbooks
If wb.Name < ThisWorkbook.Name Then wb.Close False
Next
If this post helps click Yes
---------------
Jacob Skaria
"Seeker" wrote:
Dear All,
Some files are opened under ActiveWindow.Visible = False when a master file
opened, a small code is needed to be placed in the Workbook_BeforeClose to
check if any invisible file(s) still open, if yes, make invisible file(s) be
visible and close file(s). A thread has mentioned by using
Windows(€śfile.xls€ť).Visible = True, how should I do that please?
Regards
|