LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Allowing User to save file

I have an application that we copy information into and then need to save it
as a CSV file. I have written the simple code below that does exactly what I
need it to. The user does not need to have the current file or the saved
file open when completed. I have a button they click and the file saves and
closes.

Can anyone tell me how to change to code to allow the user to pick the name
and path of where they would like it to be saved? The way I have it setup if
the path does not exist I get an error.

Also, if the file they were coping from was open and always the same name is
there a way I could get this file to copy the information and paste it. I
would also need to have some type of if error resume so if they did not have
the file open.

Any help will be appreciated.

Private Sub United_Click()
Sheets("Census Data").Select
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:="C:\Documents and
Settings\Cindy\Desktop\Census Export Files\United.csv", FileFormat _
:=xlCSV, CreateBackup:=False
ActiveWorkbook.Close
End Sub

 
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
Excel File says locked by My User ID - Can't Save kristen0316 Excel Worksheet Functions 1 February 23rd 07 06:00 PM
User defined file name on save Jim G Excel Discussion (Misc queries) 11 October 30th 06 01:29 AM
How do I suppress user dialog in File Save As? Tony Lin[_2_] Excel Programming 1 March 29th 06 08:56 AM
User cannot save excel file in workbook Justin@Martin Excel Worksheet Functions 0 May 16th 05 01:52 PM
Prompt user to save their file Sharon[_5_] Excel Programming 4 September 29th 03 09:44 PM


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