Array with excel sheet inside (need 2 code rows please)

E

EPIGONO75

Hi,
I need two-three code rows...
I'd like to define an array and put inside all the name of the sheet included in the excel file.

I need also one row to understand how can I take these data included in the array.
Thanks.
 
E

EPIGONO75

Il giorno venerdì 14 giugno 2013 09:05:57 UTC+2, (e-mail address removed) ha scritto:
Hi, I need two-three code rows... I'd like to define an array and put inside all the name of the sheet included in the excel file. I need also one row to understand how can I take these data included in the array. Thanks.


I'm blocked because I can't add the sheet name into the array.
What's wrong in this code?.

Dim Vettore() As Variant
For loopInt = 1 To Worksheets.Count
Vettore = Worksheets(loopInt).Name
Next
 
C

Claus Busch

Ciao,

Am Fri, 14 Jun 2013 06:42:21 -0700 (PDT) schrieb (e-mail address removed):
Dim Vettore() As Variant
For loopInt = 1 To Worksheets.Count
Vettore = Worksheets(loopInt).Name
Next

try:
Sub Test()
Dim Vettore() As Variant
Dim loopint As Integer

ReDim Vettore(Sheets.Count - 1)
For loopint = 0 To Worksheets.Count - 1
Vettore(loopint) = Sheets(loopint + 1).Name
Next
End Sub


Regards
Claus Busch
 
E

EPIGONO75

Il giorno venerdì 14 giugno 2013 09:05:57 UTC+2, (e-mail address removed) ha scritto:
Hi, I need two-three code rows... I'd like to define an array and put inside all the name of the sheet included in the excel file. I need also one row to understand how can I take these data included in the array. Thanks.

thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top