Try this (sh is the WorkSheet Object)
A complete example loading a WorkBook, making this change, saving and exiting:Code:With sh.UsedRange sh.Cells(.Row, .Column + .Columns.Count) = "CATATAN" End With
Code:Dim ex As Excel.Application Dim wb As Excel.Workbook Dim sh As Excel.Worksheet Set ex = New Excel.Application Set wb = ex.Workbooks.Open("C:\wb1.xls") Set sh = wb.Worksheets(1) With sh.UsedRange sh.Cells(.Row, .Column + .Columns.Count) = "CATATAN" End With wb.Save Set sh = Nothing wb.Close Set wb = Nothing ex.Application.Quit Set ex = Nothing




Reply With Quote