Replace text character using VBA replace code

jaym6939

New Member
Joined
Jun 26, 2020
Messages
43
Office Version
  1. 365
Platform
  1. Windows
i am new to VBA. I have number of parts populated under multi-select listbox. what i want to do is, when user select parts under list box and press action parts button (click event) based on selection under combo box Action it should change part and populate under part tracker sheet to respected column reference to change number under top of form.
i would like to change parts as per below,
if action combo box has,
RP= when user click on action selected parts, it should change 2nd last character of part end. Example (if part is at AAW, when action part click event happened, part should change to ABW and follow on until reaches to AZW.
can use Replace function but don't know how to link it to click event.
RC= no change to part. same part End populate under part tracker sheet to respected column reference to change number under top of form.
can use Replace function but don't know how to link it to click event.
DP= Delete this part for future reference. keeping in part tracer list but remove from list box from next change.

i have tried replace function and keep searching on web to get this on working. if you can help me that would be great.
below is image for your reference,
i have tried to upload file but due to size it is not allowing.
you can find at below link,
Part tracker test2.xlsm
thanks
 

Attachments

  • part action .JPG
    part action .JPG
    62.3 KB · Views: 8

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

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