L
Libby
Hi
I have two workbooks called Book1 and Book2
Book2 has a password to open and is readonly
When I open Book1 from Book2, the Workbook_Open event in Book2 doesn't run,
or it runs but doesn't have any effect, even if I step through it. No error
messages appear, it just doesn't work.
The code is as follows
'Book1
Sub Workbook_Open
Workbooks.Open "path to book2",,,open password
ThisWorkbook.close
end sub
'Book2
Sub Workbook_Open
msgbox ok
Call ShowSheets 'macro stored in Module1 which
'unhides hidden sheets
sheet3.name = "Success"
end sub
The reason I want to open one workbook from another like this is because
unless the main workbook, Book2, is password to open, it can be opened in
Word and all the veryhidden sheets viewed. Hence I password to open Book2 and
use another Workbook that doesn't contain any hidden sheets to open it.
I'm using xl97
Thanks in advance
I have two workbooks called Book1 and Book2
Book2 has a password to open and is readonly
When I open Book1 from Book2, the Workbook_Open event in Book2 doesn't run,
or it runs but doesn't have any effect, even if I step through it. No error
messages appear, it just doesn't work.
The code is as follows
'Book1
Sub Workbook_Open
Workbooks.Open "path to book2",,,open password
ThisWorkbook.close
end sub
'Book2
Sub Workbook_Open
msgbox ok
Call ShowSheets 'macro stored in Module1 which
'unhides hidden sheets
sheet3.name = "Success"
end sub
The reason I want to open one workbook from another like this is because
unless the main workbook, Book2, is password to open, it can be opened in
Word and all the veryhidden sheets viewed. Hence I password to open Book2 and
use another Workbook that doesn't contain any hidden sheets to open it.
I'm using xl97
Thanks in advance