Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / September 2004

Tip: Looking for answers? Try searching our database.

Excel Sheet Names

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leo - 22 Sep 2004 14:44 GMT
Hi -

I am trying to write a code that allows me to add all
worksheet names into an array.

My array is defined as:
Dim SheetName (20) as String

I tried the following code but it doesn't seem to work:

For z = 1 to SheetCount

SheetName(z) = xlswb.Worksheets.Add

Next z

I am trying to look for a command that reads each 'tab' in
a workbook and 'sends' the name of each worksheet to my
array.

Please help.

Thanks
Ken Snell [MVP] - 22 Sep 2004 16:04 GMT
Change
   SheetName(z) = xlswb.Worksheets.Add

to
   SheetName(z) = xlswb.Worksheets(z).Name

Signature

       Ken Snell
<MS ACCESS MVP>

> Hi -
>
[quoted text clipped - 19 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.