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

  • Thread starter Thread starter EPIGONO75
  • Start date Start date
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.
 
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
 
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
 
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.
 
Back
Top