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

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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