MS-Excel macro help!
May. 22nd, 2005 05:34 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I’m writing a macro that, among other things, saves the MS-Excel spreadsheet:
ActiveWorkbook.SaveAs Filename:= “EventList.txt”, FileFormat:= xlText
However, every time it runs I get a dialog box asking for permission to replace the old file.
Anyone know how to disable that box?
ActiveWorkbook.SaveAs Filename:= “EventList.txt”, FileFormat:= xlText
However, every time it runs I get a dialog box asking for permission to replace the old file.
Anyone know how to disable that box?
no subject
Date: 2005-05-22 03:43 pm (UTC)- rename the old file
- save the new file
- if the save was successful, delete the renamed file
no subject
Date: 2005-05-22 06:43 pm (UTC)no subject
Date: 2005-05-23 08:28 am (UTC)no subject
Date: 2005-05-23 09:39 am (UTC)The ORA books that I have all delete the file right before they do the save. LAAAAME.
no subject
Date: 2005-05-23 07:17 pm (UTC)I just recorded a macro that saved the file with the same filename as an existing one, so I'd be prompted to overwrite the existing file. This is what it recorded:
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\Administrator\My Documents\foo.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
Does that help you at all?
no subject
Date: 2005-05-23 09:12 am (UTC)no subject
Date: 2005-05-23 09:38 am (UTC)Tom