Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default open excel spreadsheet with password


When using a macro to open a spreadsheet, if the spreadsheet is password
protected & I know what the password is, what code would I use to open
the spreadsheet with the password?

thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=384808

  #2   Report Post  
Posted to microsoft.public.excel.programming
moi moi is offline
external usenet poster
 
Posts: 27
Default open excel spreadsheet with password

Sub OpenProtectedFile()
Dim wb As Workbook
Dim ws As Worksheet
Set wb = Workbooks.Open("C:\Password Protected File.xls", , , ,
"password1", "password2")
Set ws = wb.Sheets("Sheet1")
ws.Activate
ws.Cells(1, 1).Value = "Modified by VBA"
End Sub

"rocket0612"
schreef in bericht
...

When using a macro to open a spreadsheet, if the spreadsheet is password
protected & I know what the password is, what code would I use to open
the spreadsheet with the password?

thanks


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile:
http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=384808



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I forgot my password to open an excel document, how do I open it? chris ohearn Excel Discussion (Misc queries) 1 August 11th 08 02:32 PM
How to open Excel spreadsheet when forgotten password Glenys693 Excel Discussion (Misc queries) 0 March 26th 06 11:49 PM
How to open Excel spreadsheet when forgotten password bigwheel Excel Discussion (Misc queries) 0 March 26th 06 11:43 PM
How can I open an excel spreadsheet if I forgot the password? SheppyShep Excel Worksheet Functions 1 October 1st 05 01:19 AM
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? oil_driller Excel Discussion (Misc queries) 1 February 8th 05 09:34 AM


All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"