tatendatiffany
Board Regular
- Joined
- Mar 27, 2011
- Messages
- 103
ok so i have created a loop that run in excel sheet range "environ4" which covers AB2:AB30 executing the command in each cell. but i am gettinfg the errror "object doesnt support thid error or property" will i try to do the same with the range "column4" AD2:AD30 where i want the results to be displayed: the errror line is in bold
Code:
Public Sub LoopQueries()
Dim i As Long
Dim SQL1 As String
SQL1 = ThisWorkbook.Worksheets("Index").Range("Environ4")
[B]ThisWorkbook.Worksheets("Index").Range ("Column4")[/B]
For j = 2 To 39
If (Sheet1.Cells(i, 2) = "") Then
j = 2
Else
j = 2
i = i + 2
End If
Next
End