I am a relatuivly new to vb and vba. I used Mark Thorpe's VBA
lessons, and tried to modify one of the homework assignemnts.
Instead of deleteing and counting dupicate rows, I need to put a
list of non repeating words into an array for later use. Here is
what I have:
Sub RemoveDuplicates()
Dim SrvNameArry() As String 'used to store array of server name
for ne workbook
Dim count, totalrows, row As Integer ' used as a counter
totalrows = ActiveSheet.UsedRange.Rows.count
count = 0
For row = totalrows To 2 Step -1
If Cells(row, 1).Value = Cells(row - 1, 1).Value Then
SrvNameArry(count) = Cells(row, 1).Value
count = count + 1
End If
Next row
End Sub
When I step through it, I get an out of sub script range when it
tries to assign the word to the array. I do not have Option Base
set so I was under the impression all arrays began at 0.
Any ideas?