Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm sure my problem is not that difficult but it seems unique as my searches haven't come up with anything similar. I have an excel file, test1.xls and I want to take sheet2 specifically and export it into C: and call the file that contains it test1.csv. In the module, I have something like this: Sub exportcsv() Dim sheet2 As Worksheet For sheet2 In ActiveWorkbook.Worksheets sheet2.Copy With ActiveSheet .Parent.SaveAs Filename:="C:" & .test1, _ FileFormat:=xlCSV .Parent.Close savechanges:=False End With Thanks for any suggestions... End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub Testme() worksheets("sheet2").copy With ActiveSheet .Parent.SaveAs Filename:="C:\test1", _ FileFormat:=xlCSV .Parent.Close savechanges:=False End With End Sub wrote: Hi, I'm sure my problem is not that difficult but it seems unique as my searches haven't come up with anything similar. I have an excel file, test1.xls and I want to take sheet2 specifically and export it into C: and call the file that contains it test1.csv. In the module, I have something like this: Sub exportcsv() Dim sheet2 As Worksheet For sheet2 In ActiveWorkbook.Worksheets sheet2.Copy With ActiveSheet .Parent.SaveAs Filename:="C:" & .test1, _ FileFormat:=xlCSV .Parent.Close savechanges:=False End With Thanks for any suggestions... End Sub -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wow, that worked! Thanks for the super quick response!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
export excel colonm to a single text file | Excel Discussion (Misc queries) | |||
[Macro excel] How to create and export a sheet into a *.inp (or *.txt) file | Excel Programming | |||
How to export all chartobjects in a sheet to powerpoint (creating a new ppt file) as pictures? | Charts and Charting in Excel | |||
Need to export file name to users sheet to the next row | Excel Programming | |||
A macro to export a sheet as UTF8 encoded Unicode file | Excel Programming |