PC Review


Reply
Thread Tools Rate Thread

Automatically Saving created FILE

 
 
macronewbie
Guest
Posts: n/a
 
      6th Jun 2010
Hi,

Just would like to ask help on how to automatically save a created file just
by the use of command button.

I have below macro code:
Sub CSVFILE()
Dim sh As Worksheet

ActiveSheet.Copy
Set sh = ActiveSheet

On Error Resume Next
sh.Buttons.Delete
sh.Rows("1:2").Delete
On Error GoTo 0
End Sub

I want to "save as" the generated new workbook automatically when I click
the command button to create the new wokbook. Is this possible? THANKS!
 
Reply With Quote
 
 
 
 
Project Mangler
Guest
Posts: n/a
 
      6th Jun 2010
Morning macronewbie


"macronewbie" <(E-Mail Removed)> wrote in message
news:4B34CF84-7405-4546-AEE6-(E-Mail Removed)...
>
> I want to "save as" the generated new workbook automatically when I click
> the command button to create the new wokbook. Is this possible? THANKS!


Not sure if you want to be able to choose a path and filename. This is a
simpler version:

ActiveSheet.SaveAs Filename:="c:\Temp\CSVfile.xls"



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving a file to have the filename of the dated it was created Dave Microsoft Excel Programming 1 17th May 2006 10:42 AM
Saving multi-tab excel file created from comma delimited text file =?Utf-8?B?TWFyY3VzIEF1cmVsaXVz?= Microsoft Excel Programming 2 19th Dec 2005 05:16 PM
FILES CREATED AUTOMATICALLY WHILE SAVING =?Utf-8?B?VmVub3kgVmFyZ2hlc2UgUA==?= Microsoft Excel Misc 0 30th Mar 2005 04:01 PM
access db created by saving ms project file as .mdb =?Utf-8?B?bXhpb25n?= Microsoft Access 0 3rd Nov 2004 04:21 PM
Temp file created and not deleted after saving Bryan Langer Microsoft Excel Misc 1 27th May 2004 11:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:25 PM.