Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does Excel 2000 not record "Save as" when recording a macro

Status
Not open for further replies.
Aug 19, 2003
17
GB
I hope an easy question to answer.

We have just been upgraded to Excel 2000 at work and I have noticed that when including a save or save as in a macro this is not recored.

The code is simply missing when editing the macro but it the code is manuall added it seems to work okay.

Is this a new "feature" of 2000?

Cheers all.

Kiwi
 
interesting - I don't have 2000 but I do have XP and it records save and saveas code for me - I would've thought that if this had been brought in for 2000, it would be there for XP as well.....

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Does seem strange it working in XP.

Could someone with 2000 please do a little testing 4 me? Would be very grateful for this info.

Thanks
 
KiwiRiccardo,
I am using XP Pro OS and Office 2000, I have just recorded this macro in excel and everything seems fine

Code:
Sub saveas()
'
' saveas Macro
' Macro recorded 26/11/2003 by blahblah
'

'
    ChDir "C:\Documents and Settings\blahblah\Desktop"
    ActiveWorkbook.saveas Filename:= _
        "C:\Documents and Settings\BlahBlah\Desktop\tektiptest.xls", FileFormat:= _
        xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=False
End Sub


Regards

Paul
 
I have excel 2000 and got the following:

Sub Macro2()
'
' Macro2 Macro
'
'

'
ActiveWorkbook.SaveAs Filename:="C:\xxxxx\temp\Book1.xls", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Save
End Sub


I did a save as then a save



Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
One such issue that has come up in XL97 quite often is the fact that when you use the SaveAs method, you get that file replacement error message regardless if the DisplayAlerts is on or off, should there already be a file with said name. Therefore, starting with XL2K, there is a SaveCopyAs method that will allow the code to save the workbook to any valid location without any error message coming up (provided security permissions are met on the OS side), and an added benefit, it doesn't change the references of external formulae in any other open workbook, like what SaveAs method would do. These are the 2 main differences between SaveAs and SaveCopyAs methods. I been using the SaveCopyAs method for my backup files, should any of my primary files go corrupt.

In case you are wondering, the backup program I put in is a secondary backup as the primary backup is the nightly backup. However, if either the IT department doesn't have the time to retrieve the backup or it's something that I need relatively quick and doesn't require much adjustment if any, then I will turn to my secondary backup. Main reason why I initially put in the secondary backup, not long after I started with the company, one of the department folders got deleted, and it took the IT department 3 weeks to finally decide to get the backup in place, and that left the department hung for some time without the things they needed. When that took place, I asked myself, "What would I do, if I needed something back and I didn't get it restored in a timely fashion as one would expect?" That very question and the action that the IT department showed in that situation is what prompted me to create a secondary backup system for my production reporting system.

Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top