dear developers
I have a very strange problem
I use VB to adress a Excel Workbook.
And i use a sheets name to adress it
But it would only work with the first 7 sheets,
after that he would give "subscript out of range"
this is my code
This is the one causing the troubles
Set oSheet = oWorkbook.Worksheets(Labo(i, 2))
I have a very strange problem
I use VB to adress a Excel Workbook.
And i use a sheets name to adress it
But it would only work with the first 7 sheets,
after that he would give "subscript out of range"
this is my code
Code:
Private Sub ArrayRes()
Dim strLabonaaam As String
'variabelen initialiseren
i = 0
q = 0
j = 0
'Enkel het aantal labo's moeten gedaan worden (geen extra werk)
For i = 1 To intAantalLabos Step 1
Set oSheet = oWorkbook.Worksheets(Labo(i, 2))
oSheet.Activate
For q = 7 To 50 Step 1
'blablabla
Next
Next
End Sub
Set oSheet = oWorkbook.Worksheets(Labo(i, 2))