Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
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
SaveAs Method changes Worksheet Name nmagerl Excel Programming 0 May 25th 05 04:08 PM
SaveAs Method changes Worksheet Name nmagerl[_2_] Excel Programming 0 May 25th 05 04:08 PM
A little help with SaveAs Method please Stitch45 Excel Programming 1 April 30th 05 01:41 AM
Difficulties with SaveAs method aiyou Excel Programming 3 April 26th 05 02:51 AM
SaveAs method L Buchy Excel Programming 1 July 11th 03 11:27 PM


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