Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 05 Aug 2004 21:48:09 -0500, Dave Peterson
wrote: Option Explicit Sub testme01() Dim wks As Worksheet Set wks = Worksheets("sheet1") wks.Copy 'to a new workbook With ActiveSheet.Parent .SaveAs Filename:="whateveryousaveitas.CSV", FileFormat:=xlCSV .Close savechanges:=False End With Workbooks.Open Filename:="whateveryousaveitas.CSV" End Sub Thanks, Dave. That's very neat. Using .SaveAs from the current workbook creates the CSV file but renames your workbook - which is pretty undesirable. Copying or moving to new temporary workbook as you've done avoids the problem. Bye for now, Chris Jakeman Peterborough, UK Bye for now, Chris Jakeman Peterborough, UK |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need sample for reading value from and writing value to cell E53 from outside Excel | Excel Discussion (Misc queries) | |||
Writing Fast VBA UDFs - London july19/20 | Excel Discussion (Misc queries) | |||
Writing Fast VBA UDFs - London july19/20 | Excel Worksheet Functions | |||
convert 400 word files to excel files fast? | Excel Programming | |||
Reading and writing from/into several worksheets | Excel Programming |