LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Creating an array based on worksheet index

I'm trying to create an array based on the names of the worksheets in a
workbook, using the index as the variable.

I keep getting a "constant" error, can I create a array this way?



Sub test2()

Dim wrksht(num)
Dim num As Byte
Dim WS As Worksheet

num = ActiveWorkbook.Worksheets.Count
For Each WS In Worksheets
wrksht(num) = WS.name + 1
Range("A10").Formula = wrksht(num)
ActiveCell.Offset(1, 0).Select
Next WS

End Sub


THANK YOU!!


--
Jack of all trades... master of none..
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CREATING FORMULA IN ONE WORKSHEET BASED ON MULTIPLE CRITERIA IN AN Etg-Para Excel Worksheet Functions 2 July 24th 08 05:33 AM
Creating/Naming New Worksheets Based on Select Cells in Master Worksheet Lilbit Excel Worksheet Functions 2 March 19th 08 05:05 PM
Creating an Index Bill Smith Excel Worksheet Functions 6 January 3rd 08 12:11 AM
Creating and Index with worksheet names JackR Excel Discussion (Misc queries) 1 February 23rd 06 08:16 PM
Creating a worksheet with values based on a control cell Dan Eames Excel Programming 3 July 13th 04 01:45 PM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"