When I run this I get a run time error (13) telling me after setting (what I think is a) range in those workbooks that it is, in fact, is not a range. I think there's a problem in my nomenclature, but can you guys help me out? Thanks
Option Explicit
Dim OGBook As Workbook
Dim NAVBook As Workbook
Sub NAVCheck()
Dim NetAmountColumn As Range
Dim TargetRange As Range
Dim SingleCell As Range
Dim CodeColumn As Range
Set NAVBook = FindWorkbook(sWithNameLike:="This_function_isnt_the_problem")
Set OGBook = Workbooks("some_file.xlsm")
Set NetAmountColumn = Workbooks(OGBook).Range("i2", Range("i1").End(xlDown))
Set TargetRange = Workbooks(OGBook).Range("o2", Range("o1").End(xlDown)).Offset(0, 1)
Set CodeColumn = Workbooks(NAVBook).Range("c2", Range("c1").End(xlDown))
If NAVBook Is Nothing Then
MsgBox ("NAV Workbook doesn't seem to be open. Please open current NAV workbook and run the program again.")
Else
[Something I haven't written yet]
End If
End Sub
Sorry for the sloppy indentation.