PDA

View Full Version : Solved: Two listboxes on same userform problem



ndendrinos
02-03-2011, 06:37 PM
I’ve created a userform with two lisboxes.
The row source for both are on the same sheet “Product”
Named range (CatalogAM) for listbox1is:

=OFFSET(Products!$A$2,0,0,COUNTA(Invoice!$A:$A),1) Named range (CatalogNZ) for listbox2 is:

=OFFSET(Products!$E$2,0,0,COUNTA(Invoice!$A:$A),1)
Now the strange part.
First time I trigger the userform from sheet “Invoice” I only see
one listing in each of the listboxes
As I keep adding Products to the Invoice I begin to see more listings each time

Now why would that happen?

mbarron
02-03-2011, 07:27 PM
Currently for your offset formula your value for specifying the number of rows being determined by the number of entries on the Invoice tab instead of the Products tab.

Change your offsets to:
=OFFSET(Products!$A$2,0,0,COUNTA(Products!$A:$A),1)
and
=OFFSET(Products!$E$2,0,0,COUNTA(Invoice!$A:$A),1)

ndendrinos
02-04-2011, 06:31 AM
thank you mbarron