Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Saving Files

Hi, I have some csv files which, when I open I add a top line then save
as a normal excel file, then I convert the excel file to a metastock
file. I have alot of these files so Ive tried to automate this. I used
the Record Macro option, opened the csv file added my info, closed file
saving as excel file then stopped macro. Went to my conversion software
and concerted to metastock, no problem. But when I run the macro back
my conversion software has an error, saying unable to open file. When I
do it manually again no problem.
Dim fstLine(1 To 6) As Variant

fstLine(1) = "DATE"
fstLine(2) = "OPEN"
fstLine(3) = "HIGH"
fstLine(4) = "LOW"
fstLine(5) = "CLOSE"
fstLine(6) = "VOLUME"
ChDir "H:\ShareScope-Excel Data To Trim"
Workbooks.Open Filename:="H:\ShareScope-Excel Data To Trim\AAL.csv"

Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
Selection.Resize(LBound(fstLine, 1), 6) = fstLine

ChDir "H:\Trimmed DaTa"
ActiveWorkbook.SaveAs Filename:="H:\Trimmed DaTa\AAL.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
ActiveWorkbook.Close

Any Ideas
Regards Robert

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
Saving files dkc[_2_] New Users to Excel 2 October 20th 08 08:52 PM
Saving Files PennsyNut New Users to Excel 2 December 31st 07 08:21 PM
Help - saving files MSL Excel Worksheet Functions 1 October 28th 06 03:34 PM
Closing files and saving files dan Excel Worksheet Functions 0 August 15th 06 04:07 AM
saving files Marlis Excel Discussion (Misc queries) 0 August 17th 05 05:56 AM


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