increment number on userform into textbox based on multiple characters

Mussala

Board Regular
Joined
Sep 28, 2022
Messages
88
Office Version
  1. 2019
Platform
  1. Windows
Hi,
first I would show value in ranges ("A1:D1").value in INVOICE sheet based on last row in column C in INVOICE sheet (lastrow in column C will be changed every time)
the lastrow in column C will be number like this (10.00 or 10,000.00) so in textbox1 will connect with range A1 .
combobox1 .list will be ("BUYING ,SELLING,BUYING RETURNS,SELLINGRETURNS")
these words will connect with A1:D1 cells consecutively.
if I select BUYING from combobox1 then automatically by show number in textbox1 based on cell A1.
so A1 CELL should contain BUYING word from combobox1 and INVO NO: word and Q letter and number in lastrow in column C and slash(/) and current month and hyphen (-) and current year and hyphen(-) numbers (A00)
for instance when run the form and combobox1 is empty then will not show anything in A1:D1 and textbox1.
if I select BUYING from combobox1 then A1=BUYING INVO NO:Q10.00/JAN-25-A00
if I click commandbutton1 then will be BUYING INVO NO:Q10,000.00/JAN-25-A01(will increment in last item and change numbers in last row in column C if contains 10,000.00 as example.
if I click commandbutton2 then will decrease number to return original A1=BUYING INVO NO:Q10.00/JAN-25-A00
if I if I click commandbutton2 again then will keep number as in original A1=BUYING INVO NO:Q10.00/JAN-25-A00
if save and close file and before close BUYING INVO NO:Q10,000.00/JAN-25-A01 and when open file and select BUYING from combobox1 and try click commandbutton2 then will keep BUYING INVO NO:Q10,000.00/JAN-25-A01 as in original (meaning when open file the number in A1:D1 will be original number will deal after it , not before original number)
if I select SELLING from combobox1 then B1=SELLING INVO NO:Q10.00/JAN-25-A00
if I click commandbutton1 then will be SELLING INVO NO:Q10,000.00/JAN-25-A01(will increment in last item and change numbers in last row in column C if contains 10,000.00 as example.
if I click commandbutton2 then will decrease number to return original B1=SELLING INVO NO:Q10.00/JAN-25-A00
if I if I click commandbutton2 again then will keep number as in original A1=BUYING INVO NO:Q10.00/JAN-25-A00
if save and close file and before close SELLING INVO NO:Q10,000.00/JAN-25-A01 and when open file and select SELLING from combobox1 and try click commandbutton2 then will keep SELLING INVO NO:Q10,000.00/JAN-25-A01 as in original (meaning when open file the number in A1:D1 will be original number will deal after it , not before original number TO decreasing)
without forgetting show number in textbox1 based on range A1 or B1 or C1 or D1 when selection item form combobox1 when running form.
thanks.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,226,013
Messages
6,188,421
Members
453,473
Latest member
bbugs73

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