Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Refresh listbox on userform1

Hello. The user keys in data to Userform1 and this data
feeds a spreadsheet, row by row (over 5 columns). On this
Userform1 there is a listbox that is populated with the
last 5 entries from the spreadsheet. This is done using a
defined name and a dynamic range formula:

=OFFSET(Sheet2!$A$2,COUNTA(Sheet2!$A:$A)-2,,-5,5)

Issue: I need the listbox to refresh with lastest 5
entries after the user has keyed in a new entry and hit a
command button to put in the data. In Access I have used
Refresh Query on my forms.

Thanks.
Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Refresh listbox on userform1

Jason,

Sorry, best I can do is to add this at the end of the code to add the new
entry

Me.ListBox1.RowSource =
"OFFSET(Sheet2!$A$2,COUNTA(Sheet2!$A:$A)-2,,-5,5)"

I did try calling another Listbox event, but they don't seem to force a
refresh.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jason Morin" wrote in message
...
Hello. The user keys in data to Userform1 and this data
feeds a spreadsheet, row by row (over 5 columns). On this
Userform1 there is a listbox that is populated with the
last 5 entries from the spreadsheet. This is done using a
defined name and a dynamic range formula:

=OFFSET(Sheet2!$A$2,COUNTA(Sheet2!$A:$A)-2,,-5,5)

Issue: I need the listbox to refresh with lastest 5
entries after the user has keyed in a new entry and hit a
command button to put in the data. In Access I have used
Refresh Query on my forms.

Thanks.
Jason



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
listbox will not refresh JSnader Excel Programming 1 December 8th 03 12:20 AM
userform1.activecontrol.name Italian Job Excel Programming 3 November 14th 03 12:43 PM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM
Userform1 Border Tom Ogilvy Excel Programming 1 August 13th 03 03:14 PM
Userform1 Border John Wilson Excel Programming 0 August 12th 03 04:08 PM


All times are GMT +1. The time now is 08:57 PM.

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

About Us

"It's about Microsoft Excel"