VBA Saving Data from Textbox as Integer

Kelsoca

New Member
Joined
Aug 7, 2009
Messages
16
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
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,215,025
Messages
6,122,732
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top