Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Loading a Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Loading a Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Loading a Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Loading a Userform

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Loading a Userform

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading userform problem Mats Nilsson Excel Programming 2 October 25th 06 02:06 PM
Loading a Userform Jason Zischke Excel Programming 2 March 13th 06 08:37 AM
Loading website from userform Danny Boy via OfficeKB.com Excel Programming 0 January 29th 06 04:09 PM
Loading Userform Steven Cheng Excel Programming 3 December 9th 05 07:18 PM
Loading UserForm on start up. Kobus Excel Programming 2 April 1st 05 11:13 AM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"