listbox

R

rob

I have created a listbox and added items using macro control.

The problem is that the content is not displayed at the end of the macro.
I have to scroll down and up to view the content in the listbox.

The listbox1.refresh command in the macro is not accepted.

Any other clue on how to solve this?
 
L

Leith Ross

Hello Rob,

I take it this ListBox is on a UserForm. To refresh the ListBox, you
need to refresh the UserForm by using UserForm1.RePaint


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
 
R

rob

Leith, it is not.

I have one list in a worksheet, reflecting the content of column U.
Each time the macro adds a record to U, the macro updates the list range
dynamically.
But, it does not show any content unless I scroll down and up, or right and
then left.

I tried .refresh, .repaint, etc.. all returning an error message that the
object does not allow this operation. of course I can add a scroll down,
scroll up in my macro, but that is not as I want it to happen.
 
L

Leith Ross

Hello Rob,

Because the ListBox is embedded on the Worksheet, you can force a
"repaint" of the Worksheet simply by switch back an forth between 2
worksheets. Say it is on Sheet1, select Sheet2 and then select to Sheet1
again.


--
Leith Ross

Sincerely,
Leith Ross

'The Code Cage' (http://www.thecodecage.com/)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top