Salve a tutti!
Quando creo un foglio Excel mi dà di default 3 Sheets...come faccio ad aumentarne il valore fino a quanto ne ho bisogno?! sposto lo script
Dim a As New Excel.Application
Dim b As Excel.Workbook
Dim c As Excel.Worksheet
Private Sub Form_Activate()
a.Visible = True
Set b = Excel.Workbooks.Add
Set c = Excel.Worksheets.Add
Set c = Excel.Worksheets.Item(1)
c.Name = "Anagrafica"
c.Visible = xlSheetVisible
c.Activate
Set c = Excel.Worksheets.Item(2)
c.Name = "Raccolta Dati"
Set c = Excel.Worksheets.Item(3)
c.Name = "aaa"
Set c = Excel.Worksheets.Item(4)
c.Name = "aaa1"
'foglioExcel.Visible = xlSheetHidden
End Sub
Quando metto Set c = Excel.Worksheets.Item(5) mi dà "indice non compreso nell'intervallo"
Come faccio!?
Grazie 1000