on rereading the entire thread i find that objws is a workbook object, where you need to be working with a worksheet object
vb Code:
set omysht = objws.sheets("sheet1") r = omysht.range("a65536").End(xlUp).Row +1 ' next empty row omysht.Cells(r, 1) = DatePart("yyyy", Now) omysht.Cells(r, 2) = DatePart("ww", Now) objexcel.ActiveCell.FormulaR1C1 = "=RC[-2]&""_""&""FW""&RC[-1]" omysht.Cells(r, 3) = ActiveCell.FormulaR1C1




Reply With Quote