Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dedrie
 
Posts: n/a
Default save as macro/for password

I need to add the same password to 200 documents.

I recorded a macro:
ub Macro1()
'
' Macro1 Macro
' Macro recorded 8/22/2005 by Dedrie Smith
'
' Keyboard Shortcut: Ctrl+Shift+Q
'

ActiveWorkbook.SaveAs Filename:= _
"G:\Budget 2006\Individual Managers\TAnderson"_
FileFormat:=xlNormal, Password:="newone", WriteResPassword:="meonly" _
, ReadOnlyRecommended:=True, CreateBackup:=False
End Sub

Which works, except when I open the next file, it copies the macro over with
the previous file name and then tries to save over that file.

I'm sure there's a way to have the macro name the file based on it's current
name, or the cell reference (A2) which also contains the file name, but I
don't know how to write that code.

It also may be that there's an easier way to do this other than opening each
of the 200 files.

Any assistance/suggestions are appreciated!

Thanks!!
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
Can't save Excel using Save button, hainstol Excel Discussion (Misc queries) 1 May 3rd 05 02:39 PM
cannot edit and save jp New Users to Excel 1 February 9th 05 03:25 AM
cannot edit and save jp Excel Discussion (Misc queries) 0 February 8th 05 03:27 AM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM
Missing "Save" and "Save As" functions EMSchon Excel Discussion (Misc queries) 2 December 27th 04 08:01 PM


All times are GMT +1. The time now is 08:16 PM.

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

About Us

"It's about Microsoft Excel"