Would someone be so kind as to tell me what faux pas I have created in the following code please. It stops on the second to last line with a type mismatch. I am trying to set a range, so that I can copy it over from one workbook to another. Your help will be greatly appreciated
Sub Macro1()
Dim WBO As Workbook 'original workbook
Dim WBN As Workbook 'new workbook
Dim WSO As Worksheet 'original worksheet
Dim WSN As Worksheet 'new worksheet
Dim FinalRowHinter As Range
Dim StartRowHinter As Range
Set WBO = ActiveWorkbook
Set WSO = ActiveSheet
With WSO.Range("J1:J5000")
Set H = .Find("333 Count", LookIn:=xlValues)
End With
With WSO.Range("k1:k5000")
Set i = .Find(333, LookIn:=xlValues)
End With
FinalRowHinter = WSO.Cells(H, 11)
StartRowHinter = WSO.Cells(i, 1)
Sub Macro1()
Dim WBO As Workbook 'original workbook
Dim WBN As Workbook 'new workbook
Dim WSO As Worksheet 'original worksheet
Dim WSN As Worksheet 'new worksheet
Dim FinalRowHinter As Range
Dim StartRowHinter As Range
Set WBO = ActiveWorkbook
Set WSO = ActiveSheet
With WSO.Range("J1:J5000")
Set H = .Find("333 Count", LookIn:=xlValues)
End With
With WSO.Range("k1:k5000")
Set i = .Find(333, LookIn:=xlValues)
End With
FinalRowHinter = WSO.Cells(H, 11)
StartRowHinter = WSO.Cells(i, 1)