I'm trying to put together a simple user form using a text box to capture some numbers and save to the spreadsheet as a number not text. I've got everything working but no matter what I try it saves as test.
Here is the code I'm using to save the data to the spreadsheet.
'Find the next row
nextrow = Worksheets("Invoice amt").Cells(Rows.Count, 1).End(xlUp).Row + 1
'Wrtie the values from this form to that row
With Worksheets("Invoice amt")
.Cells(nextrow, 1).Value = Me.tbSchB_No
.Cells(nextrow, 2).Value = Me.tbDom_Forn
.Cells(nextrow, 3).Value = Me.tbNo_Pcs
.Cells(nextrow, 4).Value = Me.tbDol_AMT
.Cells(nextrow, 5).Value = Me.tbWeight_lb
.Cells(nextrow, 6).Value = Me.tbNet_Wt
End With
Unload Me
frmSchB.Show
Here is the code I'm using to save the data to the spreadsheet.
'Find the next row
nextrow = Worksheets("Invoice amt").Cells(Rows.Count, 1).End(xlUp).Row + 1
'Wrtie the values from this form to that row
With Worksheets("Invoice amt")
.Cells(nextrow, 1).Value = Me.tbSchB_No
.Cells(nextrow, 2).Value = Me.tbDom_Forn
.Cells(nextrow, 3).Value = Me.tbNo_Pcs
.Cells(nextrow, 4).Value = Me.tbDol_AMT
.Cells(nextrow, 5).Value = Me.tbWeight_lb
.Cells(nextrow, 6).Value = Me.tbNet_Wt
End With
Unload Me
frmSchB.Show