View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Param
 
Posts: n/a
Default Macro target to MsWord

Pls correct me on this formula: something wrong on opening file.

Sub openreport()
myPWD = Application.InputBox("Password Protected! Please Enter Authorized
Password to Continue!")
If myPWD = "ems5657sifooc1" Then
Application "C:\EMS-Senior1\Individual Report Class1.doc"
Else
MsgBox "Wrong Password! Bye!"
End If
For Each w In Workbooks
w.Save
Next
Application.quit
End Sub