View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
skid skid is offline
external usenet poster
 
Posts: 10
Default Find a Value Pass Row 99

Hello I'm new to VBA and I am having trouble searching for a value Past row 99
Below is the code it works great until I input data that would go into row
100 could someone please assist me.

Thanks.

Sub CheckEXT()
wrkbook = "MEL.xls"
q = RDAT.Cells(7, 1)
sPath = ThisWorkbook.Path
DEVID = RDAT.Cells(13, 1)
FileExists = (Len(Dir(sPath & "\EXTS\" & wrkbook)) 0)
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False

If FileExists = True Then
WbToOpen = (sPath & "\EXTS\" & wrkbook)
Workbooks.Open (WbToOpen)
Set wrksht = ActiveWorkbook.Worksheets("MEL")
With wrksht.Range("B1:B1000")
Set b = .Find(DEVID, Lookat:=xlRows)
If b Is Nothing Then
RDAT.Cells(37, 1) = 0
Else

' This is the Problem Child

RECN = Right(b.Address, 2)

' This is the Problem Child
I need to chang the 2 to 3 when it reaches cells over 99 but I can't figure
out how to make it work


For i = 1 To 11
x = i + 1
RDAT.Cells(x, 5) = wrksht.Cells(RECN, i)
Next i
End If
End With
Workbooks(wrkbook).Close savechanges:=True
End If
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.EnableEvents = True
End Sub