multicolumn listbox with formatted fields - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

multicolumn listbox with formatted fields

leonvleonv Posts: 1Member
I am fairly new to Excel VBA and need some help. I have an excel form that inlcudes a multicolumn listbox that displays item number, item description, and price. It is populated from a master spreadsheet which includes an amount field. The amount field in the spreadsheet is (apparently) is a float as there are values such as 1924.3439. The cells are formatted as currency, so the example shows up as $1,924.34. The master sheet also needs to be filtered based on other selections in the form.

If I use rowsource to populate the listbox, it picks up the currency formatting, but it displays all rows regardless of any data filtering.

If I copy the range to an array and then copy the array to the listbox, I get only the filtered rows, but I get unformatted numbers (floats) insead of formatted as currency.

How can I populate a multicolumn listbox with formatted values? Is there a way to have rowsource only pick up visible cells?

Or, is there a simple way to format the data in the array? I tried using value2, but that didn't pick up the currency format.

Your help will be greatly appreciated!
Sign In or Register to comment.