Vba code for manual input on text box

Diwas R Bhattarai

New Member
Joined
Jan 16, 2018
Messages
9
Hi,

[FONT=Helvetica, Arial, Verdana, sans-serif]I have a userform with several textbox (Arrow1, Arrow2,........). When the form opens, the text box are populated from values in a worksheet:[/FONT]
[FONT=Helvetica, Arial, Verdana, sans-serif]code is[/FONT]

Private Sub Arow3_Change()


On Error Resume Next
Me.Arow2.RowSource = ""
Me.Arow4 = Application.WorksheetFunction.VLookup(Me.Arow2, Sheet5.Range("Data"), 2, 0)
Me.Arow6 = Application.WorksheetFunction.VLookup(Me.Arow2, Sheet5.Range("Data"), 4, 0)
Me.Arow5 = Application.WorksheetFunction.VLookup(Me.Arow2, Sheet5.Range("Data"), 6, 0)
If Me.Arow3.Value > "" Then Me.Arow7 = Me.Arow3.Value * Me.Arow6.Value
On Error GoTo 0
End Sub

Reference
"Data" refers to a name range, Data Range "2" refers to "Code no.", Data Range "4" refers to "Sale Price" & Data Range "6" refers to "Stock", where as Arrow 3 is named "Quantity" Arrow 4 is named "Code No." Arrow 5 is named "Stock", Arrow 6 is named "Sale Price" & Arrow 7 is named "Total"

What i need to do is on Arrow 6 i need to put the value manually on the user form which will be calculated on Arrow 7 (Quantity * Sale Price = Total)

How can i do that on the same above give code

Thanks
Diwas
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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