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: 67
Default Saving a worksheet to a separate file

I've used this same code in the past and it worked, but its not working in
this workbook. Need some help. I'm using Excel 2003 and want save a
worksheet in my workbook as a separte file using a filename generated from
the worksheet. Here is the code I'm using:

Private Sub CommandButton6_Click()


Sheets("quicksilver asc").Select
Range("c8:c10").Select
Selection.Copy
Sheets("quicksilver asc f").Select
Sheets("quicksilver asc F").Range("c8:c10").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False



Sheets("quicksilver asc f").Copy


Dim strappend As String
Dim strpath As String
Dim str3 As String

strappend = ActiveSheet.Range("l8")
strpath = "c:\field tickets\"
str3 = ActiveSheet.Range("b14")

fsavename = strpath & strappend & str3 & ".xls"

ActiveWorkbook.Sheets("quicksilver asc f").SaveAs fsavename
ActiveWorkbook.Close False

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
Saving just 1 worksheet out of a workbook to a separate file Rich D Excel Discussion (Misc queries) 1 January 23rd 08 02:31 AM
Saving Totals Row to Separate Worksheet - Next w/o For Error ? u473 Excel Programming 2 September 4th 07 09:17 PM
How do I save part of a worksheet in a separate file? cleo Excel Worksheet Functions 3 May 15th 07 01:26 AM
Saving each row of an excel file in separate excel files acamci Excel Programming 2 July 18th 06 10:04 AM
Saving a sheet as a separate file Herren''s Excel Discussion (Misc queries) 2 March 30th 06 09:46 PM


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