I am having trouble defining a range.
I am writing in word vba referencing an excel spreadsheet
Have included the relevant parts to my code
I am having trouble with the line set myrange1 =![]()
Dim MaxNo As Long Dim xlApp As New Excel.Application Dim xlWB As New Excel.Workbook Dim MyRange1 As Range Set xlWB = xlApp.Workbooks("Job Data Base NEW.xls") Set MyRange1 = xlWB.Sheets("F09").Range("P:P") MaxNo = xlApp.Application.WorksheetFunction.Max(MyRange1) MsgBox (MaxNo)
Hope someone can help
Bookmarks