Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userform I'm using to prompt the user to update a list where the
data is held in a worksheet. Each time the user presses the "update" button in the book, the userform for the udpate is accessed via userform.show. On initializaion, I use a list box that adds items based on the underlying data sheet. The problem I'm having is that if I use the form once and add new data to the sheet, if a user accesses the userform again, the data does not "reload" from scratch, pulling into the listbox the most recently added data. So, basically, I'm needing help in using listbox1.AddItem on initialization for a userform to "load" new data from a worksheet each and every time the userform is accessed. Any thoughts? Thanks in advance, Chad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Before loading new data you have to clear the listbox
Userform1.listobx1.Clear "Chad" wrote: I have a userform I'm using to prompt the user to update a list where the data is held in a worksheet. Each time the user presses the "update" button in the book, the userform for the udpate is accessed via userform.show. On initializaion, I use a list box that adds items based on the underlying data sheet. The problem I'm having is that if I use the form once and add new data to the sheet, if a user accesses the userform again, the data does not "reload" from scratch, pulling into the listbox the most recently added data. So, basically, I'm needing help in using listbox1.AddItem on initialization for a userform to "load" new data from a worksheet each and every time the userform is accessed. Any thoughts? Thanks in advance, Chad |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do i simply use listbox1.clear or what?
Thanks, Chad "Joel" wrote: Before loading new data you have to clear the listbox Userform1.listobx1.Clear "Chad" wrote: I have a userform I'm using to prompt the user to update a list where the data is held in a worksheet. Each time the user presses the "update" button in the book, the userform for the udpate is accessed via userform.show. On initializaion, I use a list box that adds items based on the underlying data sheet. The problem I'm having is that if I use the form once and add new data to the sheet, if a user accesses the userform again, the data does not "reload" from scratch, pulling into the listbox the most recently added data. So, basically, I'm needing help in using listbox1.AddItem on initialization for a userform to "load" new data from a worksheet each and every time the userform is accessed. Any thoughts? Thanks in advance, Chad |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It is the same method you are using to add items. Listbox1.clear should
work. You are using listbox1.add already. "Chad" wrote: Do i simply use listbox1.clear or what? Thanks, Chad "Joel" wrote: Before loading new data you have to clear the listbox Userform1.listobx1.Clear "Chad" wrote: I have a userform I'm using to prompt the user to update a list where the data is held in a worksheet. Each time the user presses the "update" button in the book, the userform for the udpate is accessed via userform.show. On initializaion, I use a list box that adds items based on the underlying data sheet. The problem I'm having is that if I use the form once and add new data to the sheet, if a user accesses the userform again, the data does not "reload" from scratch, pulling into the listbox the most recently added data. So, basically, I'm needing help in using listbox1.AddItem on initialization for a userform to "load" new data from a worksheet each and every time the userform is accessed. Any thoughts? Thanks in advance, Chad |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Perfect, thanks!
"Joel" wrote: It is the same method you are using to add items. Listbox1.clear should work. You are using listbox1.add already. "Chad" wrote: Do i simply use listbox1.clear or what? Thanks, Chad "Joel" wrote: Before loading new data you have to clear the listbox Userform1.listobx1.Clear "Chad" wrote: I have a userform I'm using to prompt the user to update a list where the data is held in a worksheet. Each time the user presses the "update" button in the book, the userform for the udpate is accessed via userform.show. On initializaion, I use a list box that adds items based on the underlying data sheet. The problem I'm having is that if I use the form once and add new data to the sheet, if a user accesses the userform again, the data does not "reload" from scratch, pulling into the listbox the most recently added data. So, basically, I'm needing help in using listbox1.AddItem on initialization for a userform to "load" new data from a worksheet each and every time the userform is accessed. Any thoughts? Thanks in advance, Chad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loading userform problem | Excel Programming | |||
Loading a Userform | Excel Programming | |||
Loading website from userform | Excel Programming | |||
Loading Userform | Excel Programming | |||
Loading UserForm on start up. | Excel Programming |