Mega Code Archive
Store the location of the active cell and then return it to the stored location
Sub set()
Set myActiveCell = ActiveCell
Set myActiveWorksheet = ActiveSheet
Set myActiveWorkbook = ActiveWorkbook
'take actions here
myActiveWorkbook.Activate
myActiveWorksheet.Activate
myActiveCell.Activate
End Sub