Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Save text file as Excel 2007 with cell as filename

I have a delimited file which has been reformatted and need to save it as
Excel 2007workbook (.xlsx?) I am using the contents of a cell as the
filename. It is saving, but when I try and re-open it it says the file
extension is not recognized. If I save as .xls it has the old 2003 icon on
the file. Also, I don't want the file to prompt the user to re-save when
they try and close. Here is what I have:

Range("A1").Select
ActiveWorkbook.SaveAs Filename:=Range("Z1").Value & ".xlsx"

End Sub

Thanks,
Kelly
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Save text file as Excel 2007 with cell as filename

Make sure you specify the correct fileformat, too.

See help for .saveas for more details.

KellyinCali wrote:

I have a delimited file which has been reformatted and need to save it as
Excel 2007workbook (.xlsx?) I am using the contents of a cell as the
filename. It is saving, but when I try and re-open it it says the file
extension is not recognized. If I save as .xls it has the old 2003 icon on
the file. Also, I don't want the file to prompt the user to re-save when
they try and close. Here is what I have:

Range("A1").Select
ActiveWorkbook.SaveAs Filename:=Range("Z1").Value & ".xlsx"

End Sub

Thanks,
Kelly


--

Dave Peterson
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
Save text file with value from Excel Cell stamped with date and time Rushna Excel Programming 4 July 27th 08 06:22 PM
Excel wants to save an open file to another filename in VBA script BPoppe Excel Programming 0 November 9th 07 09:24 AM
Filename has Url in file-save dialog when saving exported Excel do GJones Excel Programming 0 September 1st 04 08:17 PM
Save file, refer filename to cell and change directory Metin[_3_] Excel Programming 3 April 23rd 04 02:13 AM
Save excel file with filename = cell text TroyB[_2_] Excel Programming 1 November 26th 03 01:00 AM


All times are GMT +1. The time now is 04:19 PM.

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"