workbook open password protected

  • Thread starter Thread starter Johnnyboy5
  • Start date Start date
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
 
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
 
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
 
Back
Top