Row 505 - hard code in offset value and the code works just fine over and over.
Row 510 or 511 using variable - It works the first time through, but always fails the second time through Error 91 Object Variable
500 ObjXL.Workbooks(1).Worksheets(1).Rows((intRowPos - 1) & ":" & (intRowPos - 1)).Select ' Selection for Bold header column (can make 2 Rows if needed)
'ObjXL.Range("A" & intRowPos - 1).Select ' Select the first column at our starting Row for the header
505 ObjXL.Workbooks(1).Worksheets(1).Range("A" & intRowPos - 1 & ":H" & intRowPos - 1).Select ' Put Title at one row less than where data starts
' ****************************** this next line will error the Second Time Through even if all forms are closed back to switchboard ******
510 'ObjXL.Workbooks(1).Worksheets(1).Range(ActiveCell,Offset(0, 0), ActiveCell.Offset(0, intMaxheaderColCount)).Select
511 'ObjXL.Range(ActiveCell, ActiveCell.Offset(0, intMaxheaderColCount)).Select
' in debug window ? objxl.Activecell does return correct value in the active cell
520 Call Send2ExcelRowHeaderFormat(ObjXL) ' Format the data row heading bold, outline, as a Select
Bookmarks