L
Lacy
I've written a VB code in a macro and I keep getting a run
time error. I have reread the code several times and can't
figure out what is wrong. It may be several things I'm
kinda new to this. Would someone take a look at it and see
if you can tell what is wrong.
Thanks, Lacy
Do
Count = 1
Total = Count
For i = ActiveWorkbook.Worksheets("Sheet1").Cells(3, 10)
To ActiveWorkbooks.Worksheets("Sheet1").Cells(Rows.Count,
10).End(xlUp).Row
For j = ActiveWorkbooks.Worksheets("Sheet1").Cells(3,
11) To ActiveWorkbooks.Worksheets("Sheet1").Cells
(Rows.Count, 11).End(xlUp).Row
For k = ActiveWorkbooks.Worksheets("Sheet1").Cells(3,
34) To ActiveWorkbooks.Worksheets("Sheet1").Cells
(Rows.Count, 34).End(xlUp).Row
If i = i + 1 Then
If j = j + 1 Then
If k = k + 1 Then
Count = Count + 1
End If
End If
End If
For l = 1 To ActiveWorkbook.Sheets("Sheet1").Cells
(Rows.Count, 10).End(xlUp).Row
Total = Total + Count
Next l
Next k
Next j
Next i
Loop While ActiveWorkbook.Sheets("Sheet1").Cells
(Rows.Count, 10).End(xlUp).Row.Value <> ""
time error. I have reread the code several times and can't
figure out what is wrong. It may be several things I'm
kinda new to this. Would someone take a look at it and see
if you can tell what is wrong.
Thanks, Lacy
Do
Count = 1
Total = Count
For i = ActiveWorkbook.Worksheets("Sheet1").Cells(3, 10)
To ActiveWorkbooks.Worksheets("Sheet1").Cells(Rows.Count,
10).End(xlUp).Row
For j = ActiveWorkbooks.Worksheets("Sheet1").Cells(3,
11) To ActiveWorkbooks.Worksheets("Sheet1").Cells
(Rows.Count, 11).End(xlUp).Row
For k = ActiveWorkbooks.Worksheets("Sheet1").Cells(3,
34) To ActiveWorkbooks.Worksheets("Sheet1").Cells
(Rows.Count, 34).End(xlUp).Row
If i = i + 1 Then
If j = j + 1 Then
If k = k + 1 Then
Count = Count + 1
End If
End If
End If
For l = 1 To ActiveWorkbook.Sheets("Sheet1").Cells
(Rows.Count, 10).End(xlUp).Row
Total = Total + Count
Next l
Next k
Next j
Next i
Loop While ActiveWorkbook.Sheets("Sheet1").Cells
(Rows.Count, 10).End(xlUp).Row.Value <> ""