Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listbox will not refresh | Excel Programming | |||
userform1.activecontrol.name | Excel Programming | |||
listbox.value not equal to listbox.list(listbox.listindex,0) | Excel Programming | |||
Userform1 Border | Excel Programming | |||
Userform1 Border | Excel Programming |