RobbieC
Active Member
- Joined
- Dec 14, 2016
- Messages
- 376
- Office Version
- 2010
- Platform
- Windows
Hi there, I have a userform which grabs data from a range when triggered. The userform is a 'generic' form which I hope to use to edit several rows of data (all formatted in the same way)
Each input box in the userform imports data from the relevant cell in the row and I need it to save back when the user clicks update... For example, on row12, the update would be:
I am also importing another cell into the userform which is just the row number (ie. 12) and I was hoping I could substitute that into the code as a string...
Please forgive my ignorance, but I come from a php programming background where I would just use
I hope you understand what I'm trying to do here and that there is an easy solution for this
Thanks
Each input box in the userform imports data from the relevant cell in the row and I need it to save back when the user clicks update... For example, on row12, the update would be:
Code:
Private Sub UpdateSheetButton_Click()
Range("M12").Value = Me.Value1.Value
Range("M13").Value = Me.Value2.Value
Range("M14").Value = Me.Value3.Value
Range("M15").Value = Me.Value4.Value
Unload Me
End Sub
I am also importing another cell into the userform which is just the row number (ie. 12) and I was hoping I could substitute that into the code as a string...
Please forgive my ignorance, but I come from a php programming background where I would just use
Code:
$rownumber = Range("AE12").Value
Range("M'echo $rownumber;'").Value = Me.Value1.Value
I hope you understand what I'm trying to do here and that there is an easy solution for this
Thanks
Last edited: