Excel Macro Overflow 6 Error Help

xxcucumberxx

New Member
Joined
Feb 23, 2016
Messages
7
Can some one help me fix this error. When i run it the first time it works fine but when i make the edits and run it agian i get the "Overflow 6 Error"

Dim cid(100) As String
Dim rX As Range
Dim rEnd As Range
Dim i As Integer
Dim x As Integer

x = 0
Set rX = Sheets("VSP Template").Range("A2")
Set rEnd = Range(Find_Last_Row).Offset(1, 0)
Do Until rX.Address = rEnd.Address
Select Case Len(rX)
Case 6
rX = "'00" & rX
Case 7
rX = "'0" & rX
End Select
For i = 0 To 100
If cid(i) = "" Then
cid(i) = rX
x = x + 1
Exit For
End If
If cid(i) = rX Then Exit For

Next i


Set rX = rX.Offset(1, 0)
Loop

If x > 1 Then

For i = 0 To x - 1
UF1.lb1.AddItem cid(i)
Next i

UF1.Show
DoEvents



Else


End If




Can some one please help me fix this and thank you who does!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,215,463
Messages
6,124,965
Members
449,201
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top