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: 6

Some videos you may like

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.

Watch MrExcel Video

Forum statistics

Threads
1,114,468
Messages
5,548,184
Members
410,824
Latest member
Bobmn4
Top