J
jamby
HI
New to VB and trying to write a program that gets two values from
cells and calculates a column of values.
cell "C19" = 4.0938
cell "C21" = 4.8438
=========================
Sub FillInRange()
Dim intK As Long
Dim intT As Long
Dim intX As Long
Dim intY As Long
intX = Range("C19").Value
intY = Range("C21").Value
intT = Range("C15").Value
Range("L28").Select
For I = 1 To (intT - 1) Step 1
intK = intX + (intY * I)
Selection.Value = intK
ActiveCell.Offset(1, 0).Select
Next
End Sub
=======================
But in the program they appear as C19 = 4 C21 = 5
Is there a way to get the decimal value into the variables?
Sorry if this dosen't make to much sense as I am not sure of the terms
to use.
Jim
New to VB and trying to write a program that gets two values from
cells and calculates a column of values.
cell "C19" = 4.0938
cell "C21" = 4.8438
=========================
Sub FillInRange()
Dim intK As Long
Dim intT As Long
Dim intX As Long
Dim intY As Long
intX = Range("C19").Value
intY = Range("C21").Value
intT = Range("C15").Value
Range("L28").Select
For I = 1 To (intT - 1) Step 1
intK = intX + (intY * I)
Selection.Value = intK
ActiveCell.Offset(1, 0).Select
Next
End Sub
=======================
But in the program they appear as C19 = 4 C21 = 5
Is there a way to get the decimal value into the variables?
Sorry if this dosen't make to much sense as I am not sure of the terms
to use.
Jim