ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Listbox initialized on workbook load (https://www.excelbanter.com/excel-programming/319375-listbox-initialized-workbook-load.html)

Kandi

Listbox initialized on workbook load
 
I have a listbox on a spreadsheet (not a user form) that is populated via the
listfillrange property. I can make selections and save them. When I open the
workbook, Excel initializes the listbox object and removes my selections. Is
there a way to disable this "feature"?
Thanks!



Tom Ogilvy

Listbox initialized on workbook load
 
Use the saved selections to re-establish your selections in the listbox.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
I have a listbox on a spreadsheet (not a user form) that is populated via

the
listfillrange property. I can make selections and save them. When I open

the
workbook, Excel initializes the listbox object and removes my selections.

Is
there a way to disable this "feature"?
Thanks!





Kandi

Listbox initialized on workbook load
 
Hi Tom,
Saved selections does not appear to be a feature of Excel. If it is where
do I find it?

Thanks,
Kandi

"Tom Ogilvy" wrote:

Use the saved selections to re-establish your selections in the listbox.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
I have a listbox on a spreadsheet (not a user form) that is populated via

the
listfillrange property. I can make selections and save them. When I open

the
workbook, Excel initializes the listbox object and removes my selections.

Is
there a way to disable this "feature"?
Thanks!






Tom Ogilvy

Listbox initialized on workbook load
 
You originally said:
I can make selections and save them.


You would make a record of them someplace in your workbook - perhaps on a
hidden sheet.

Or in the source data, perhaps put an X in an adjacent column. Then read
back the information in a macro and make the selections in the listbox -
perhaps in the workbook_open event or the sheet activate event.

http://www.cpearson.com/excel/events.htm
Chip Pearson's page on events.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
Hi Tom,
Saved selections does not appear to be a feature of Excel. If it is where
do I find it?

Thanks,
Kandi

"Tom Ogilvy" wrote:

Use the saved selections to re-establish your selections in the listbox.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
I have a listbox on a spreadsheet (not a user form) that is populated

via
the
listfillrange property. I can make selections and save them. When I

open
the
workbook, Excel initializes the listbox object and removes my

selections.
Is
there a way to disable this "feature"?
Thanks!








Kandi

Listbox initialized on workbook load
 
The problem is that Excel automatically rebinds the objects to the fill list
removing any selections that were saved in the file prior to any macro code
running. So how do you stop this from happening? Does Excel have an option
that you can turn off so the object is not refreshed every time the workbook
is opened?

This would be simple if I had just one or a even few listboxes. I have many
and each refer back to the same feeder data of about 20 selections.

It would be really great if the objects were handled like links so you could
tell Excel not to update the links and avoid the refreshing of the selections.

"Tom Ogilvy" wrote:

You originally said:
I can make selections and save them.


You would make a record of them someplace in your workbook - perhaps on a
hidden sheet.

Or in the source data, perhaps put an X in an adjacent column. Then read
back the information in a macro and make the selections in the listbox -
perhaps in the workbook_open event or the sheet activate event.

http://www.cpearson.com/excel/events.htm
Chip Pearson's page on events.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
Hi Tom,
Saved selections does not appear to be a feature of Excel. If it is where
do I find it?

Thanks,
Kandi

"Tom Ogilvy" wrote:

Use the saved selections to re-establish your selections in the listbox.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
I have a listbox on a spreadsheet (not a user form) that is populated

via
the
listfillrange property. I can make selections and save them. When I

open
the
workbook, Excel initializes the listbox object and removes my

selections.
Is
there a way to disable this "feature"?
Thanks!









Tom Ogilvy

Listbox initialized on workbook load
 
I am not aware of any single setting or combination of settings that will do
this.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
The problem is that Excel automatically rebinds the objects to the fill

list
removing any selections that were saved in the file prior to any macro

code
running. So how do you stop this from happening? Does Excel have an

option
that you can turn off so the object is not refreshed every time the

workbook
is opened?

This would be simple if I had just one or a even few listboxes. I have

many
and each refer back to the same feeder data of about 20 selections.

It would be really great if the objects were handled like links so you

could
tell Excel not to update the links and avoid the refreshing of the

selections.

"Tom Ogilvy" wrote:

You originally said:
I can make selections and save them.


You would make a record of them someplace in your workbook - perhaps on

a
hidden sheet.

Or in the source data, perhaps put an X in an adjacent column. Then

read
back the information in a macro and make the selections in the listbox -
perhaps in the workbook_open event or the sheet activate event.

http://www.cpearson.com/excel/events.htm
Chip Pearson's page on events.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
Hi Tom,
Saved selections does not appear to be a feature of Excel. If it is

where
do I find it?

Thanks,
Kandi

"Tom Ogilvy" wrote:

Use the saved selections to re-establish your selections in the

listbox.

--
Regards,
Tom Ogilvy

"Kandi" wrote in message
...
I have a listbox on a spreadsheet (not a user form) that is

populated
via
the
listfillrange property. I can make selections and save them. When

I
open
the
workbook, Excel initializes the listbox object and removes my

selections.
Is
there a way to disable this "feature"?
Thanks!












All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com