Total newbie at VBA here, so any help would be greatly appreciated.
Here is my code. I'm getting an error at "Filename = Dir(Pathname & "*.csv")" and can't figure out why. My aim is to insert some columns of data into the CSV, create a chart, and resave as XLSX. That's it! Thanks in advance.
Dim Filename, Pathname As String
Dim wb As Workbook
Pathname = ActiveWorkbook.Path & "C:\Users\Username\Desktop\csv\csv\"
Filename = Dir(Pathname & "*.csv")
Do While Filename <> ""
Set wb = Workbooks.Open(Pathname & Filename)
Filename = Dir(Pathname & ".xlsx")
Sub DoWork(wb As Workbook)
message edited by jswalker