ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating Charts in Excel 2002 (XP) (https://www.excelbanter.com/excel-programming/299592-re-creating-charts-excel-2002-xp.html)

Greg Koppel

Creating Charts in Excel 2002 (XP)
 
Try this code. Put your csv file into a folder called temp on the C drive.

Sub TextImporter()
myFile = Dir("C:\temp\*.csv")
Do Until myFile = ""
Workbooks.OpenText Filename:="C:\temp\" & myFile,
DataType:=xlDelimited, Space:=True
ActiveSheet.Name = myFile
myFile = Dir()
Loop
Charts.Add
End Sub

HTH, Greg

"Tony" wrote in message
...
I am ready to rip my hair out.
The following is the code:

Sub Make_Chart1()
Infile = {name of .csv file being input to routine - deleted for the

discussion}

Workbooks.Open _
Filename:= Infile

Charts.Add {{{ Error occurs here}
...

--- When I open Excel to this macro, I crash at the "Charts.Add" Line with

a "Type Mismatch", although it DOES add the sheet! How do I get past this
fershluggina error??? (BTW: I tried recording PRECISELY the same sequence
in Macro, then when I replayed the sequence I got the same error!!!) PLEASE
Help!





All times are GMT +1. The time now is 01:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com