Need help creating a second ListBoxOutput without corrupting the first.

Blasirl

New Member
Joined
Aug 7, 2013
Messages
16
Office Version
  1. 2021
Platform
  1. Windows
I am trying to create a multipart spreadsheet to capture data from individual forum users that ultimately will be output to a semi-static sheet to allow other users to see what vehicle and options they have in order to best help them with their posted questions.

I have multiple issues, but the first is to either tweak the borrowed code to create a second ListBoxOutput without corrupting the first or to suggest another route for me to follow. I would like the output for the second list box to be in Data!C27 as the first is in Data!C26

The second issue is I need to make a make a dropdown list appear when the Tuned checkbox in ListBox.1 is checked. I would use the the data list located Data!U4:U9 When the appropriate item is selected, it should be output in the appropriate spot in the ListBoxOutput in Data!C26 (Same for Sheet 2)

The third issue is to take the list from the ListBoxOutput and list it row by row in Vehicle One!I9:I16 for immediate user feedback (Same for Sheet 2)

Lastly I would like to output of the completed sheets to be inserted into the Output Sheet in the appropriate spaces. This is currently a Word Doc, but I need to find out what type of sheet is used in Xenforo still.

Sheet 1
Vehicle Data sheet - R3 - Output Sheet added added.xlsm
ABCDEFGHIJK
1Vehicle OneVehicle TwoData
2
3Brand: GMDrive:Right-Hand Click on the blue button
4 below to expand & then
5Country of Origin: United StatesAppearance Package:Nonecollapse the List Box
6
7Make: ChevroletEngine:1.4T
8
9Model: CruzeTransmission:6 speed AutoYour selections will be
10saved. We need help to
11Version:FleetFuel of choice:93 display this data. If you
12are a Microsoft Office
13Generation:Gen_IAdditives used:NoneGuru and want to help,
14please contact a
15Trim Level:1LTInfotainment system:Standardmoderator.
16
17Model Year:2014Rim Size:18"
18(Optional) VIN
19Body Style:SedanModified:Body & Powertrain
20
21
22
23Additional info: You can list major mods & anything that may be relevant to maintenance issuesTrailer hitch and lighting wiring installed, switchback front turn signals with resisters installed,
24
25
26
27
28
29
30
31
32
Vehicle One
Cells with Data Validation
CellAllowCriteria
D13List=Generation
D15List=INDIRECT($D$13)
D5List=Data!$B$4:$B$17
D7List=Data!$C$4:$C$9
D9List=Data!$D$4:$D$8
D11List=Data!$E$4:$E$7
D19List=Data!$H$4:$H$7
G3List=Data!$K$4:$K$5
G5List=Data!$L$4:$L$7
G7List=Data!$M$4:$M$10
G9List=Data!$N$4:$N$10
G11List=Data!$O$4:$O$11
G13List=Data!$P$4:$P$7
G15List=Data!$Q$4:$Q$8
G17List=Data!$R$4:$R$9
G19List=Data!$S$4:$S$7
D17List=Data!$G$4:$G$21

Sheet 2
Vehicle Data sheet - R3 - Output Sheet added added.xlsm
ABCDEFGHIJK
1Vehicle OneVehicle TwoData
2
3Brand: GMDrive:Click on the blue button
4 below to expand & then
5Country of Origin: Appearance Package:collapse the List Box
6
7Make: Engine:
8
9Model: Transmission:This option for Vehicle Two is currently unsupported
10
11Version:Fuel of choice:
12
13Generation:Gen_IAdditives used:If you are a Microsoft Office Guru and wish to help - please contact
14
15Trim Level:Infotainment system:
16a Moderator .
17Model Year:Rim Size:
18(Optional) VIN
19Body Style:Modified:
20
21
22
23Additional info: You can list major mods & anything that may be relevant to maintenance issues
24
25
26
27
28
29
30
31
32
Vehicle Two
Cells with Data Validation
CellAllowCriteria
D15List=INDIRECT($D$13)
D13List=Generation
G15List=Data!$Q$4:$Q$9
G13List=Data!$P$4:$P$8
G9List=Data!$N$4:$N$11
G7List=Data!$M$4:$M$11
G5List=Data!$L$4:$L$8
G3List=Data!$K$4:$K$6
D19List=Data!$H$4:$H$8
D11List=Data!$E$4:$E$8
D9List=Data!$D$4:$D$9
D7List=Data!$C$4:$C$10
D5List=Data!$B$4:$B$18
G17List=Data!$R$4:$R$10
G19List=Data!$S$4:$S$8
G11List=Data!$O$4:$O$12
D17List=Data!$G$4:$G$22


Sheet 3
Vehicle Data sheet - R3 - Output Sheet added added.xlsm
BCDEFGHIJKLMNOPQRSTU
1Vehicle OneVehicle TwoData
2
3Country of OriginMakeModelVersionGenerationModel YearBody StyleGen_IGen_IIDriveAppearance PackageEngineTransmissionFuel AdditivesInfotainment Rim SizeModificationsOther notable itemsTuner
4United StatesChevroletCruzeConsumerGen_I2008Sedan1LSLRight-Hand None1.85 speed Auto87NoneStandard16"StockNoneBNR
5ArgentinaHoldenLacetti PremiereFleetGen_II2009Hatchback2LSLSLeft-Hand RS (Rally Sport) 1.4T5 Speed Manual88EthanolPioneer17"Body OnlyZ-Link (Watts-Link)Trifecta
6AustrailaOpelAstra SedanCommercial2010Station Wagon1LTLTMidnight Edition 1.66 speed Auto89MethanolMyLink18"Powertrain onlyFour Wheel Disc BrakesVermont Tuning
7BrazilDaewooJGCoPO2011OtherECOPremierOther1.6T6 Speed Manual91OtherMyLink w/Nav19"Body & PowertrainKeyless EntryZZP
8ChinaNazaOther20122LT1.7T9 speed Auto93Other20"Sun RoofHP Tuners
9IndiaOther20132.0TD2.0TCVTDieselOtherLowering SpringsOther
10Kazakhstan2014LTZOtherECO ManualBioDieselCoilovers
11Malaysia2015OtherBagged
12Mexico2016Tuned
13Russia2016.5
14South Korea2017
15Thailand2018
16Vietnam2019
17Other2020
182021
192022
202023
21Other
22
23
24
25Noteable Items
26Vehicle 1Lowering Springs;Tuned
27Vehicle 2
28
29Somehow I would like to have two different ListBoxOutput boxes. One in C24 and the other in C25.
30And once the data has been input by the user, I wanted the worksheet to automatically sort the output
31(my initial thought was to use Text To Columns) and then paste the individual items on Vehicle One
32worksheet in I9 thru I16 and then the same for Vehicle two on the Vehicle Two worksheet..
Data


Sheet 4 - see attached picture

This is the borrowed code (How to create drop down list with multiple checkboxes in Excel?)
VBA Code:
Sub Rectangle1_Click()
'Updated by Extendoffice 20200730
Dim xSelShp As Shape, xSelLst As Variant, I, J As Integer
Dim xV As String
Set xSelShp = ActiveSheet.Shapes(Application.Caller)
Set xLstBox = ActiveSheet.ListBox1
If xLstBox.Visible = False Then
    xLstBox.Visible = True
    xSelShp.TextFrame2.TextRange.Characters.Text = "Pickup Options"
    xStr = ""
    xStr = Range("ListBoxOutput").Value
   
    If xStr <> "" Then
         xArr = Split(xStr, ";")
    For I = xLstBox.ListCount - 1 To 0 Step -1
        xV = xLstBox.List(I)
        For J = 0 To UBound(xArr)
            If xArr(J) = xV Then
              xLstBox.Selected(I) = True
              Exit For
            End If
        Next
    Next I
    End If
Else
    xLstBox.Visible = False
    xSelShp.TextFrame2.TextRange.Characters.Text = "Select Options"
    For I = xLstBox.ListCount - 1 To 0 Step -1
        If xLstBox.Selected(I) = True Then
        xSelLst = xLstBox.List(I) & ";" & xSelLst
        End If
    Next I
    If xSelLst <> "" Then
        Range("ListBoxOutput") = Mid(xSelLst, 1, Len(xSelLst) - 1)
    Else
        Range("ListBoxOutput") = ""
    End If
End If
End Sub
 

Attachments

  • Screenshot of Word Document embeded in Output Sheet - Sheet 4.png
    Screenshot of Word Document embeded in Output Sheet - Sheet 4.png
    208.9 KB · Views: 6
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I tried to attach the XLSM file renamed to a txt file, but am not able to do that. I am willing to share the file as a xlsm, zip or renamed txt file but missed the opportunity to attach it. I saw a dialog box saying there is a way to attach files, but I hit Post to quickly. I tried editing to get back there but missed it.


Here is another screenshot - the macro is in use at this time
 

Attachments

  • Screenshot of Vehicle One after Select Options has been toggled to Pickup Options.png
    Screenshot of Vehicle One after Select Options has been toggled to Pickup Options.png
    40.5 KB · Views: 6
Upvote 0
I was actually able to post the file here. I am not sure if you will need permissions to access it or not though.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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