View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dr. Darrell Dr. Darrell is offline
external usenet poster
 
Posts: 74
Default I'd like to modify mt Macro ...

I have a macrco which fills in a table which will be used to create a
Run-Chart. When I have filled values into a worksheet, I click a Forms Button
and the data is recorded in several cells, (L3:R3).

When I enter new values into the worksheet and hit the button again I would
like the data to be filled into the next row of cells, (L4:R4), and
subsequently (L5:R5), (L6:r6) etc.

How do I change the address to enter the data each time the form button is
clicked.

My code is as follows:

Sub SaveRunChartData_101_4900_30Deg()
'
' SaveRunChartData_101_4900_30Deg Macro
' Macro recorded 2/24/2010 by Darrell.Roak
'

'
Range("L3").Select
ActiveCell.FormulaR1C1 = "=R[4]C[-7]"
Range("M3").Select
ActiveCell.FormulaR1C1 = "=R[4]C[-6]"
Range("N3").Select
ActiveCell.FormulaR1C1 = "=R[33]C[-8]"
Range("O3").Select
ActiveCell.FormulaR1C1 = "=R[12]C[-10]"
Range("P3").Select
ActiveCell.FormulaR1C1 = "=R[21]C[-11]"
Range("Q3").Select
ActiveCell.FormulaR1C1 = "=R[28]C[-12]"
Range("R3").Select
ActiveCell.FormulaR1C1 = "=R[31]C[-12]"
Range("L4").Select
End Sub