Dim xls As Workbook, Dim Csv As ????

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

When you deine xls you use workbook, e..g Dim xls As Workbook, Set xls
= Workbooks.Open

What about with csvs, should they simply be:

Dim csv
Set csv = .Open

Thanks fro your help
 
A csv file opens as a Workbook

Dim sFile as string
Dim wb As Workbook

sFile = "c:\<path>\filename.csv"
set wb = Workbooks.Open(sFile)

Regards,
Peter T
 
Back
Top