LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default Listbox update on command

So easy . . . my brain just isn't working that way tonight. Thanks!
--
Thank you,

Jennifer


"Greg Wilson" wrote:

My take on "a named offset" was that your database is a *dynamic named range*
and that the rowsource is the same (references by name). This may be
completely wrong. However, your post suggests that adding to the database
(row source) is not the problem. Just updating the listbox to reflect it. All
you need to do to get the list box to update is to just state that the
rowsource is the name of the range. Simplified example code:

Private Sub CommandButton1_Click()
With Range("Database")
.Cells(.Cells.Count + 1).Value = TextBox1.Text
End With
ListBox1.RowSource = "Database"
End Sub

Regards,
Greg

"Jennifer" wrote:

Hello guru's,
I have a listbox displayed in a form filled through the row source in
properties (a named offset). When the user adds data to a textbox then hits
the add button it goes to the database. The form remains open and i would
like to have the listbox update with the new information immediately instead
of showing the added data when i reactivate the form. Help.


--
Thank you,

Jennifer

 
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
Multiselect Listbox/ command button C Wilson Excel Programming 2 May 21st 07 09:50 PM
Update multiple rows from listbox [email protected] Excel Programming 1 September 14th 06 06:41 PM
Listbox not refreshing on update tdw Excel Programming 2 July 6th 06 05:06 PM
UserForm Listbox doesn't update befar Excel Programming 1 May 23rd 06 01:05 AM
printing using vba; listbox/command button bkey01[_4_] Excel Programming 2 April 21st 04 05:54 AM


All times are GMT +1. The time now is 03:19 PM.

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"