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

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
 
P

Peter T

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top