Macro help

  • Thread starter Thread starter Scottmk
  • Start date Start date
S

Scottmk

Hello. Can anyone help me with a simple macro question. For some
reason, when I run the macros created, they are happening in other
cells. I looked on excel help, and it seems as if relative reference
macros are occuring, but I didn't choose that. The only thing I am
doing for the macros is assigning a cell a value of 0 through five.
So when I record, I just go to the cell, click =, and type in the
digit. Can anyone see any errors.

Sub TRYTD0()
'
' TRYTD0 Macro
' Macro recorded 10/21/2003 by Scott Keller
'

'
Sheets("Weights").Select
ActiveCell.FormulaR1C1 = "=0"
Range("B3").Select
Sheets("Measures").Select
End Sub

This is an example of where I am trying to make cell B2 = 0.

Thanks
 
Hi:

All you need is:

Sheets("Weights").Range("B2").Formula = "=0"

or:

Sheets("Weights").Range("B2").Value = 0

if there is no requirement to have it in formula form.

Regards,

Vasant.
 
Back
Top