Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Get Sheet Names in Excel File. 1

Status
Not open for further replies.

gazal

Programmer
Apr 30, 2003
212
OM
Hi Friends

I am developing a small application which will upload data from excel files to SQL Server using VB 6.
The Work Books may have many sheets in it.
So before upload i want to show the user all the sheet names in the selected work book. so then user can choose from which sheet he wants to upload data.

I tried something using Excel Object but can get only the Count not the Sheet Name.

Any Help will be appreciated

Thanks in advance

Gazal
 

Ok, here is a hint for you...

This is an example adapted from the excel help files that you should be able to figure out how to adapt...

[tt]
Dim S As Sheets
Dim W As Worksheet
Set S = Application.Worksheets
For Each W In S
MsgBox W.Name
Next
[/tt]

Good Luck

 
hi Vb5Prgmr

Again u have been of great help to me... thanks buddy

Gazal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top