-
I was able to get something working, but get an error if no values are present.
[vba]
Dim iRow As Long
Dim ws As Worksheet
Dim r As Range
Dim lRowN As Long
Dim lRowB As Long
Set ws = Worksheets("Capture")
lRowN = ws.Cells(Rows.Count, 1).End(xlUp).Value
lRowB = ws.Cells(Rows.Count, 3).End(xlUp).Value
If lRowN = ws.OLEObjects("TxtBox1").Object.Value And _
lRowB = ws.OLEObjects("TxtBox2").Object.Value Then
[/vba]
If there is a value in Row 2 it works the way I want it, but if no values in columns I get
Run-time error '13': Type Mismatch at
lRowN = ws.Cells(Rows.Count, 1).End(xlUp).Value
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules