retrieve textbox value for editing

jeck32

New Member
Joined
Sep 23, 2022
Messages
9
Office Version
  1. 2016
hi guys,
i have a userform with a combobox linked to a vlookup for different currencies. now, once lets say GBP is selected, it would return the current exchange rate to USD in labelbox1.
now, i have multiple textboxes for entries, and whatever value i enter in the textbox it would return its value in my selected currency, and this table would be shown in a listbox.

now, if i would like to edit the value in the textboxes, i can select it from the listbox and edit the values in the textbox and save the changes via commandbutton. updating the textbox values should update the conversion too.
right now, i am getting an overflow error, please advise

1665737585017.png


i have the the sample code in my textboxes:
Private Sub totaTxt_Change()
dim PackLbV as single

PackLab.Caption = Val(totaTxt.Text) / Val(label1.Caption)

PackLbV = Format(PackLab.Caption, "00.00")
PackLab.Caption = PackLbV

and for the listbox

Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Me.IDCounter.Value = Me.ListBox1.List(Me.ListBox1.ListIndex, 0)
Me.totaTxt_Value = Me.ListBox1.List(Me.ListBox1.ListIndex, 2)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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