If the Range object is not in the active worksheet in the active workbook
Sub rangeDemo() Workbooks("Sales.xls").Worksheets("DataInput").Range("C10").Value = 10 End Sub