ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro & Password (https://www.excelbanter.com/excel-discussion-misc-queries/75244-macro-password.html)

paulrm906

Macro & Password
 

Hello everyone

I have made a macro which opens a file with a password (this is to
update it) then saves it and then closes, unfortunately I can not get
it to open without asking me for a password. I have already tried lots
of differant things but nothing works. Below I have pasted a copy of
the macro and just hope that some one can help me.

Sub Auto_Open()
'
' Auto_Open Macro
' Macro recorded 4/03/2006 by Paul Maynard
'

'
Workbooks.Open Filename:= _
"E:\Documents and Settings\anna\Desktop\Paul\Work\111.xls"
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub


Thanks in advance'

Paul Maynard
Moscow


--
paulrm906

Jim Cone

Macro & Password
 
Paul,
Try...
Workbooks.Open Filename:= _
"E:\Documents and Settings\anna\Desktop\Paul\Work\111.xls", Password:="MySecret"

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"paulrm906"
wrote in message...
Hello everyone
I have made a macro which opens a file with a password (this is to
update it) then saves it and then closes, unfortunately I can not get
it to open without asking me for a password. I have already tried lots
of differant things but nothing works. Below I have pasted a copy of
the macro and just hope that some one can help me.

Sub Auto_Open()
' Auto_Open Macro
' Macro recorded 4/03/2006 by Paul Maynard
Workbooks.Open Filename:= _
"E:\Documents and Settings\anna\Desktop\Paul\Work\111.xls"
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub


Thanks in advance
Paul Maynard
Moscow
paulrm906

paulrm906

Macro & Password
 

Thanks Jim

It works great. did not think it would be something so simple.

Paul Maynard
Moscow.


--
paulrm906
------------------------------------------------------------------------
paulrm906's Profile: http://www.excelforum.com/member.php...o&userid=28776
View this thread: http://www.excelforum.com/showthread...hreadid=518952



All times are GMT +1. The time now is 03:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com