karthik
karthik

Reputation: 4735

How to read all the worksheets in a Excel file

I have an excel file which contains 7 to 8 worksheets(sheet1,sheet2 ....), i want to read all the sheets one by one.Can somebody suggest me how to achieve this in VB6.0

Upvotes: 0

Views: 331

Answers (1)

Anders Lindahl
Anders Lindahl

Reputation: 42870

You can use the WorkSheets collection. It has a Count property that contains the number of workshees, and you can access sheet 2 via Worksheets(2) - you don't need to know the name of the sheet.

Upvotes: 1

Related Questions