View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ravi Ravi is offline
external usenet poster
 
Posts: 63
Default using user defined constants

Hello:

when I run the following code Range A1 contaims "Name?" .What am I doing
wrong ? Also in the for loop I would like to i to increment in steps of 0.1
how do i do that ? they way I tried does not work ?Thanks in advance

Ravi

Sub EnterInfo()
Dim i As Double
Dim x As Integer
Dim y As Integer
Dim del As Range
Dim cel As Range
Set cel = Range("a1")
Set del = Range("b1")
x = 2
y = 7
For i = 1 To 10
cel(i).Formula = "=SIN(x+y)"

del(i).Value = i
i = i + 0.1
Next i

End Sub