Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Not quite sure where did you get the following statement:
Application "C:\EMS-Senior1\Individual Report Class1.doc" -- the purpose is to open the file, right? Try to replace it with this one and re-run your code: Shell "WinWord C:\EMS-Senior1\Individual Report Class1.doc" It worked in my PC! -- Best regards, --- Yongjun CHEN ================================= XLDataSoft - Data Analysis Expert, Excel/VBA Specialist - - - - www.XLDataSoft.com - - - - Free Excel-Based Data Processing Tool is Available for Download ================================= "Param" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editing a simple macro | Excel Worksheet Functions | |||
Can T Get Macro To Run! | New Users to Excel | |||
macro with F9 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |