emosms
01-06-2015, 05:45 AM
P.S. - NOT Initialization, but Declaration
Hi,
A macross I developed home refuses to work at home.
I get the following error:
12684
I get the same on 'for each' loop, so I reworked one loop to have the looped item as Variant, but this is insane, don't want to do this for all loops...
The index loop works if I declare:
Sub test_sql_str()
Dim i As Integer
For i = 1 To 5
Debug.Print "sdf"
Next i
End Sub
Strangely enough, the macros worked as is at home and If I start macro in a fresh excel file, I can use loops as usual.
No need to initialize index and for each variables.
Tried to search descriptevily google about this, but not sure how to formulate the problem.
Regards
Hi,
A macross I developed home refuses to work at home.
I get the following error:
12684
I get the same on 'for each' loop, so I reworked one loop to have the looped item as Variant, but this is insane, don't want to do this for all loops...
The index loop works if I declare:
Sub test_sql_str()
Dim i As Integer
For i = 1 To 5
Debug.Print "sdf"
Next i
End Sub
Strangely enough, the macros worked as is at home and If I start macro in a fresh excel file, I can use loops as usual.
No need to initialize index and for each variables.
Tried to search descriptevily google about this, but not sure how to formulate the problem.
Regards