That's a lot of code for a simple task:
Private Sub Workbook_Open() with Getobject("H:\Schedule\Login.xlsx") .Sheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft).Offset(, 1).resize(5).value=activesheet.Range("A1:A5").value .close -1 end with End Sub




Reply With Quote