Help me understand listbox code please.

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,827
Office Version
  1. 2007
Platform
  1. Windows
Please can you help me understand the code in the supplied screen shot.

I see the code shows x = 3 to last row.
So the values are from row 3 then down the page, I get that.

The blue arrow -1, please advise.

The green arrow is where the values will be placed in the listbox, columns start at 0, I get that.

The red arrow is where the value that will populate listbox are to be taken from, so x is row 3 then the numbers are each column on worksheet, I get that.
 

Attachments

  • 75428C3B-98B1-4174-81B1-69B93F171039.jpeg
    75428C3B-98B1-4174-81B1-69B93F171039.jpeg
    99.1 KB · Views: 27

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
LIstcount starts at one, whereas the Listbox Index (List) starts at 0 so the - 1 is to make it start at the first position of the Listbox Index
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,553
Members
452,928
Latest member
101blockchains

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