Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macros - Saving over protected worksheet using a macro.

I need to create a macro to save an excel file in a separate directory.
However I am not that familiar with creating macros (i'm much better at
making changes to an existing macro).

The problem that I am running into is that the file that is saved in the
other directory is a protected excel spreadsheet, so when I run my macro it
gives me an error.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Macros - Saving over protected worksheet using a macro.

Please post your code and specify where the error is, it helps to diagnos the
problem. Otherwise we are just guessing what you need.

--
Cheers,
Ryan


"Dolores" wrote:

I need to create a macro to save an excel file in a separate directory.
However I am not that familiar with creating macros (i'm much better at
making changes to an existing macro).

The problem that I am running into is that the file that is saved in the
other directory is a protected excel spreadsheet, so when I run my macro it
gives me an error.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Macros - Saving over protected worksheet using a macro.

Actually,
I used the macro record tool that comes with excel, I am better an modifying
macros than I am at creating them. So the only part of the code that was
written was the save as (see below).
Sub saveas()
'
' saveas Macro
' Macro recorded 9/30/2008 by dgomez
'
ChDir "F:\Illinois-Indy Sales"
ActiveWorkbook.saveas Filename:="F:\Illinois-Indy Sales\Bid
Register.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

when I run the macro I get the following error "Cannot access read-only
document "Bid Register.xls"

"RyanH" wrote:

Please post your code and specify where the error is, it helps to diagnos the
problem. Otherwise we are just guessing what you need.

--
Cheers,
Ryan


"Dolores" wrote:

I need to create a macro to save an excel file in a separate directory.
However I am not that familiar with creating macros (i'm much better at
making changes to an existing macro).

The problem that I am running into is that the file that is saved in the
other directory is a protected excel spreadsheet, so when I run my macro it
gives me an error.

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
Macros on Protected worksheet Ronnie Excel Discussion (Misc queries) 2 September 28th 07 08:27 PM
Run macros on protected worksheet Lisa D'K Excel Worksheet Functions 0 February 4th 06 08:06 PM
Run macros on protected worksheet paul Excel Worksheet Functions 0 February 4th 06 11:53 AM
allow macros in protected worksheet Marge Excel Worksheet Functions 1 May 25th 05 04:23 PM
Is is possible to run macros on a protected worksheet petunia Excel Worksheet Functions 1 January 18th 05 04:55 PM


All times are GMT +1. The time now is 03:46 AM.

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"