Hi All,
I am fairly new to VBA programming and need a little help.
I am currently creating a spreadsheet so a friend can press a button in the first worksheet that will bring up a userfrom. the data will then be entered into the form and the user will press the Add button.
I have so far created this and it works fine the only problem is it will only enter the data on to the sheet where the button is and I need it to enter the data onto a different sheet to the macro button.
Below is my current code,
Private Sub btnAdd_Click()
rowCounter = 4
While Cells(rowCounter, 3).Value <> ""
rowCounter = rowCounter + 1
Wend
Cells(rowCounter, 3).Value = tbxDate.Text
Cells(rowCounter, 4).Value = tbxDescription.Text
Cells(rowCounter, 5).Value = tbxAmount.Text
End Sub
Please can someone advise as to what extra code I need enter for this process to work as I wish.
Thank you for your assistance.
Martin
Bookmarks