Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Method changes Worksheet Name
I am using the following code in a form running from a Macro in Exce 2002: filesavename = Application.GetSaveAsFilename("", _ fileFilter:="CSV Files (*.CSV), *.csv") If filesavename < False Then MsgBox "Save As " & filesavename End If ActiveWorkbook.SaveAs filesavename, FileFormat:=xlCSV The workbook saves as a new CSV file but changes the name of the activ sheet. What can I do about this? Thank -- nmager ----------------------------------------------------------------------- nmagerl's Profile: http://www.msusenet.com/member.php?userid=161 View this thread: http://www.msusenet.com/t-187045632 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Method changes Worksheet Name
Maybe you could just copy that worksheet to a new workbook and then save from
the Option Explicit Sub testme01() Dim FileSaveName As Variant FileSaveName = Application.GetSaveAsFilename("", _ fileFilter:="CSV Files (*.CSV), *.csv") If FileSaveName < False Then MsgBox "Save As " & FileSaveName ActiveSheet.Copy 'to a new workbook ActiveWorkbook.SaveAs FileSaveName, FileFormat:=xlCSV ActiveWorkbook.Close savechanges:=False End If End Sub nmagerl wrote: I am using the following code in a form running from a Macro in Excel 2002: filesavename = Application.GetSaveAsFilename("", _ fileFilter:="CSV Files (*.CSV), *.csv") If filesavename < False Then MsgBox "Save As " & filesavename End If ActiveWorkbook.SaveAs filesavename, FileFormat:=xlCSV The workbook saves as a new CSV file but changes the name of the active sheet. What can I do about this? Thanks -- nmagerl ------------------------------------------------------------------------ nmagerl's Profile: http://www.msusenet.com/member.php?userid=1614 View this thread: http://www.msusenet.com/t-1870456325 -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Method changes Worksheet Name
Thanks Dave, I will do that although it is my last choice. I would really like t know what I am doing that causes this to occur. Nic -- nmager ----------------------------------------------------------------------- nmagerl's Profile: http://www.msusenet.com/member.php?userid=161 View this thread: http://www.msusenet.com/t-187045632 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Method changes Worksheet Name
That's the way excel behaves--even when you do it manually.
nmagerl wrote: Thanks Dave, I will do that although it is my last choice. I would really like to know what I am doing that causes this to occur. Nick -- nmagerl ------------------------------------------------------------------------ nmagerl's Profile: http://www.msusenet.com/member.php?userid=1614 View this thread: http://www.msusenet.com/t-1870456325 -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
SaveAs Method changes Worksheet Name
Thanks Dave, Looks like that's the way I have to do it. I appreciate the assistance. Nic -- nmager ----------------------------------------------------------------------- nmagerl's Profile: http://www.msusenet.com/member.php?userid=161 View this thread: http://www.msusenet.com/t-187045632 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SaveAs Method changes Worksheet Name | Excel Programming | |||
SaveAs Method changes Worksheet Name | Excel Programming | |||
A little help with SaveAs Method please | Excel Programming | |||
Difficulties with SaveAs method | Excel Programming | |||
SaveAs method | Excel Programming |