Macro help

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
 
V

Vasant Nanavati

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top