Feb 2, 2005 #1 solo7 Technical User Mar 14, 2001 243 NO I am using VB6 drag and drop to get a spreadsheet's location. How can I obtain the name and number of sheets within a spreadsheet ?? Solo7
I am using VB6 drag and drop to get a spreadsheet's location. How can I obtain the name and number of sheets within a spreadsheet ?? Solo7
Feb 2, 2005 2 #2 jbpez Programmer Jan 25, 2005 102 Dim xlboject as object DIm lngNumberOfSheets as long Dim i as long Dim strNameOfSheet as string Set xlobject = CreateObject("Excel.Application") xlobject.Worksheets.Count 'number of sheets in a spreadsheet For i = 1 to lngNumberOfSheets strNameOfSheet = xlobject.Worksheets(i).Name 'name of sheet ............ Next i John Borges Upvote 0 Downvote
Dim xlboject as object DIm lngNumberOfSheets as long Dim i as long Dim strNameOfSheet as string Set xlobject = CreateObject("Excel.Application") xlobject.Worksheets.Count 'number of sheets in a spreadsheet For i = 1 to lngNumberOfSheets strNameOfSheet = xlobject.Worksheets(i).Name 'name of sheet ............ Next i John Borges
Feb 2, 2005 Thread starter #3 solo7 Technical User Mar 14, 2001 243 NO Great thanks !!!! Upvote 0 Downvote
Feb 3, 2005 Thread starter #4 solo7 Technical User Mar 14, 2001 243 NO jbpez, In my eager anticipation of a problem solved I forgot to ask at what point do I specify the spreadsheet I am querying ?? solo7 Upvote 0 Downvote
jbpez, In my eager anticipation of a problem solved I forgot to ask at what point do I specify the spreadsheet I am querying ?? solo7