LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default vba instruction for file saving

It sounds like you already have the filename that the save should take place
to. If that is the case, you can pass the filename as the first argument to
the Save operation...

Application.Dialogs(xlDialogSaveAs).Show "YourFileName.txt"

If you know what directory you would like to start the dialog box from, just
qualify the filename with that path. For example...

Application.Dialogs(xlDialogSaveAs).Show "c:\Temp\YourFileName.txt"

will open the SaveAs dialog to the Temp directory on drive c: and put
YourFileName.txt into the filename field.

Rick



"umpire_43" wrote in message
...
Hi.

thanks for replying back so quick!!!

I think its close.

Retrieve the information looks right.

I know that vba has a filesave dialog box built in the system. Will the
filename be automatically put into the space provide without the user
entering it? I don't want them to enter anything into the dialog box
except
for selecting the directory where to save it

The user will have to click on save or Cancel.

does that make sense?

thanks for your help again :)

keith

"JLGWhiz" wrote:

The following does exactly what you described, but I doubt that
is what you really want. Post back with more detail if I am
right.

Sub dostuff()
myVar = ActiveSheet.Range("A1").Value '1. info retrieved
Application.Dialogs(xlDialogSaveAs).Show '2.Opens Dialog Box
'for
user
to select
'or
enter
file name.
MsgBox "File Saved As " & ActiveWorkbook.Name 'Rest of 2. And
'3.
File
Saved
End Sub

"umpire_43" wrote:

Hi,

I'm wondering if anyone can help me on this?

I'm using excel 2003.

I have several sheets that have different statements.

This is what i want to accomplish through vba.

1) I want the programming to automatically retrieve information from
the
cell within the sheet that i'm currently working on. (Note: i have
several
sheets within the workbook)
2) User will select the directory where they want to save the file but
the
filename will automatically be put into the popup dialog box.
3) Save the file automatically as pertaining to number 1.

Is this possible?
I hope you can understand.

thanks
keith






 
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
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
Saving multi-tab excel file created from comma delimited text file Marcus Aurelius Excel Programming 2 December 19th 05 05:16 PM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM
saving an excel file as an ASCII text file without delimiters Sewellst Excel Programming 4 January 7th 05 01:41 PM


All times are GMT +1. The time now is 04:11 AM.

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

About Us

"It's about Microsoft Excel"