dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,373
- Office Version
- 365
- 2016
- Platform
- Windows
I have a table and two text boxes and I want to be able to write a name and a price in them, then press a button and copy them to a table on another sheet. The table name is: Services.
I started with this code, I thought I needed to dim a few variables to hold the values of the text boxes first so I started with this code:
I know that there is more code needed but I didn't know how to write it. The table is called ServicePrices and the column names are Description and Unit_Price. I have two text boxes that I want be able to enter a new service and the price and add it to the bottom of the table. Could someone help me with the extra code please?
I started with this code, I thought I needed to dim a few variables to hold the values of the text boxes first so I started with this code:
Code:
Private Sub cmdAddNewService_Click()
Dim NewName As String
Dim NewPrice As String
NewName = txtName.Value
NewPrice = txtPrice.Value
End Sub
I know that there is more code needed but I didn't know how to write it. The table is called ServicePrices and the column names are Description and Unit_Price. I have two text boxes that I want be able to enter a new service and the price and add it to the bottom of the table. Could someone help me with the extra code please?