Re: Get list of Excel sheets in MS Access
- From: "Alex Dybenko" <alexdyb@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 17:52:20 +0400
Thanks Rob!
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"RobFMS" <Rob@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:Ogjndu6YGHA.4688@xxxxxxxxxxxxxxxxxxxxxxx
Here is a prototype you can work with. Make sure you have your references set to Excel from the code IDE(Tools->References).
Public Sub GetWorksheets()
Dim objExcel As Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objWork*** As Excel.Work***
Dim intX As Integer
Set objExcel = New Excel.Application
Set objWorkbook = objExcel.Workbooks.Add
Set objWorkbook = objExcel.Workbooks(1)
For intX = 1 To 5
objWorkbook.Worksheets.Add Type:=Excel.XlSheetType.xlWorksheet
Next intX
For Each objWorksheet In objExcel.ActiveWorkbook.Worksheets
Debug.Print objWork***.Name
Next
objExcel.Quit
Set objWorkbook = Nothing
Set objExcel = Nothing
End Sub
HTH
--
Rob Mastrostefano
FMS Professional Solutions Group
http://www.fmsinc.com/consulting
Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com
"Nick Giordano" <nick@xxxxxxxxxx> wrote in message news:%23i40juwYGHA.5012@xxxxxxxxxxxxxxxxxxxxxxxHi,
How can I get a list of sheets in an Excel file loaded into a MS Access table?
Thank you,
Nick
.
- Follow-Ups:
- Re: Get list of Excel sheets in MS Access
- From: Nick Giordano
- Re: Get list of Excel sheets in MS Access
- References:
- Get list of Excel sheets in MS Access
- From: Nick Giordano
- Re: Get list of Excel sheets in MS Access
- From: RobFMS
- Get list of Excel sheets in MS Access
- Prev by Date: Re: Get list of Excel sheets in MS Access
- Next by Date: Re: Wanted: COM+ Surrey/UK
- Previous by thread: Re: Get list of Excel sheets in MS Access
- Next by thread: Re: Get list of Excel sheets in MS Access
- Index(es):
Loading