#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default save files

in a script, how dow i save the file by what ever is in a specific cell,thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default save files

In VBA for Excel the basic command is

ActiveWorkbook.SaveAs Filename:=Worksheets("Sheet1").Range("A1").Value

A1 would contain the path and filename to save it under, or filename to just
save in default location.

If you want to prevent displaying alerts like "file exists ... overwrite?"
then use this
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:=Worksheets("Sheet1").Range("A1").Value
Application.DisplayAlerts = True

Just remember that if there are any other errors that take place such as
disk full, invalid path, etc. then things will pretty much just fail rather
dramatically.

"bkyw" wrote:

in a script, how dow i save the file by what ever is in a specific cell,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 you automatically save files to two different locations? thrasher Excel Discussion (Misc queries) 1 June 26th 06 04:24 PM
Spreadsheet lists Spyder New Users to Excel 8 October 7th 05 04:46 PM
Save as Msg box Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 August 29th 05 09:56 PM
can not save office2000 files with new name over network DF2000 Excel Discussion (Misc queries) 13 July 24th 05 08:12 PM
problem with save files from office 2003 Micha³ S Excel Discussion (Misc queries) 0 February 24th 05 09:13 AM


All times are GMT +1. The time now is 10:15 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"