Hi Guys,
I was wondering if someone could help with a macro im trying to create.
Basically the macro below asks the user for data, then copies that data into cell y1 and the time into z1.
Currently when the macro runs again it will copy and paste the new data in the same cells as before, overwriting what is there.
So i need the macro to increment the row number each time it is run, for the "time" and "from" columns.
into y2 z2
y3 z3 etc.
thanks for your help
I was wondering if someone could help with a macro im trying to create.
Basically the macro below asks the user for data, then copies that data into cell y1 and the time into z1.
Currently when the macro runs again it will copy and paste the new data in the same cells as before, overwriting what is there.
So i need the macro to increment the row number each time it is run, for the "time" and "from" columns.
into y2 z2
y3 z3 etc.
thanks for your help
Code:
#Sub add()
'
' addMacro
'
Range("g10") = Range("g10") + 1
Dim from As String
Dim too As String
from = InputBox("Where From?")
Range("y1").FormulaR1C1 = from
Range("z1").Value = Time
Range("z1").NumberFormat = "hh:mm:ss"