Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Good morning Arunjoshi This code should help: Sub Save1() Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:="C:\Book4.xls", Password:="password1" Application.DisplayAlerts = True Application.Quit End Sub When called this macro will save the file Book4.xls to the location C:\ with the password set as password1, irrespective of whether or not another password was set to the file. The Application.Quit command will then close Excel. HTH DominicB -- dominicb ------------------------------------------------------------------------ dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932 View this thread: http://www.excelforum.com/showthread...hreadid=379593 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel file opening password | Excel Discussion (Misc queries) | |||
Is there any way to be prompted for a password when opening a file | Excel Discussion (Misc queries) | |||
How to see macro code of a password protected macro without a password? | Excel Worksheet Functions | |||
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. | Excel Worksheet Functions | |||
Code to select 'Disable Macro' when opening an EXTERNAL FILE | Excel Programming |