View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JON JON JON JON is offline
external usenet poster
 
Posts: 62
Default ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-2]"

Hello Jordi,

Check if the sheet that get the entry is not protected (Tools|Protection).
If it is protected you may want to include this into your code before the
entry

Activesheet.Unprotect
....you code here
Activesheet.Protect

If it is has password you need to type the password after the "Unprotect"
and "Protect".

Regards,

Jon-jon

"Jordi" wrote in message
...
If I exectue this simple code :

Range("F8").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-2]"

It works great if I execute if from the current workbook but if the code

is
in another workbook and I include:
Windows("Libro1").Activate

It raises error 1004

Any help?