workbook open password protected

J

Johnnyboy5

workbook open password protected.

I need to be able to get a message box to appear with some
information
- before the Password message box appears. I can get the message to
appear after the Password box - but not before.

any ideas.
Johnnyboy
 
G

Gord Dibben

You will not be able to do this from within the passworded workbook you are
opening.

Not open.........no code will run to provide message.

You could open the workbook from another workbook which had code to provide the
message then move on to opening the passworded workbook.

Sub open_other()
MsgBox "message before opening other workbook"
Workbooks.Open Filename:= _
"C:\Program Files\Microsoft Office\Exceldata\otherbook.xls"
End Sub


Gord Dibben MS Excel MVP
 
J

Johnnyboy5

You will not be able to do this from within the passworded workbook you are
opening.

Not open.........no code will run to provide message.

You could open the workbook from another workbook which had code to provide the
message then move on to opening the passworded workbook.

Sub open_other()
MsgBox "message before opening other workbook"
    Workbooks.Open Filename:= _
        "C:\Program Files\Microsoft Office\Exceldata\otherbook.xls"
End Sub

Gord Dibben     MS Excel MVP

thanks - will test in work tomorrow.

john
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top