LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Including .csv to end of filename

Hello,

I have a macro that imports all the filenames from a
folder into column A. These files have the "." character
in their name. This is how the data comes to me and I
can't change it. The problem with this is that I want to
open and save each file as a CSV file. When I do this it
doesn't include the extension. I am assuming that this is
because it doesn't like the ".". The problem with this is
that later in the macro when I go back to open up the CSV
file I get the message notifying me that this file may
contain viruses and do I want to open this file? It also
puts all the data into column A rather than separate it by
the comma delimiter. I can manually add the extension to
the files by renaming each file and this fixes the problem
but there are 304 files and this data gets refreshed
weekly. Is there a way that I can automatically add the
extenstion to the end of the file when I save the each
file after importing and opening? Below is the current
statement that I use.

ActiveWorkbook.SaveAs Filename:="C:\Excel_Data\" _
& FileName, FileFormat:=xlCSVMSDOS

 
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
Including ADD-INS cmagalha Excel Worksheet Functions 1 December 21st 08 12:31 PM
Including Help in UDF dhstein Excel Discussion (Misc queries) 2 November 9th 08 05:02 AM
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
not including 0's maksud Charts and Charting in Excel 2 August 9th 05 01:43 PM


All times are GMT +1. The time now is 10:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"