stefanchik
New Member
- Joined
- Apr 27, 2011
- Messages
- 1
HI
I've trawled the boards and tried different things for hours .. to no avail
Maybe its something simple that I'm missing ? .. but I'm just not seeing it even though I've tried endless combinations
I have a User_Form that contains 2 List_Boxes .. these act as a progress bar .. showing the user in list_box 1 how many items populated into list_box 2 have so far been actioned
The Userform is called by .show on a VBA routine
Userform properties are set to 'Enabled' = true .... 'Modal' = false
Listbox properties are Visible=true, ... Enabled = true , ... Locked = false
The userform initialization code is:
ListBox2.ColumnCount = 1
ListBox2.RowSource = "H1"
ListBox2.ControlSource = "H1"
ListBox2.SetFocus
ListBox1.ColumnCount = 1
ListBox1.RowSource = "I1"
ListBox1.ControlSource = "I1"
ListBox1.SetFocus
Exit Sub
Issue
-- when the form is FIRST called .. the listboxes are blank ... as nothing has yet been written to H1 and I1 by the main routine program
-- when the main routine FIRST populates these H1 & I1 cells ( via code as shown below ) , the listboxes update with the two values
-- ( H1 is a static value that will never change once its been set in )
--- I've tried a million things, but nothing will ever get the User Form list-box to re-update from its original entered value of " 1 " in cell I1, even though the value of cell I1 has been physically changed in the excel cell by the main routine in its " while-wend " loop of the Nr of items so far actioned ... " UNLESS " that is, that after ' Do Events ', that I unload the userform .. and then immediately load it back up .. but then the box is flicking constantly on-off the screen which is not great to the users eye
The main sequence code in the while-wend loop that populates the cells is as below
... any help on how to make list box 1 update when I change the value of cell I1 is vastly appreciated
Matching_Row_Nr.Show
Range("H1").Select
ActiveCell.Value = "" + NrMatchingRows + ""
Range("I1").Select
ActiveCell.Value = "" + ThisMatchingRowNr + ""
Matching_Row_Nr.Repaint
DoEvents
I've trawled the boards and tried different things for hours .. to no avail
Maybe its something simple that I'm missing ? .. but I'm just not seeing it even though I've tried endless combinations
I have a User_Form that contains 2 List_Boxes .. these act as a progress bar .. showing the user in list_box 1 how many items populated into list_box 2 have so far been actioned
The Userform is called by .show on a VBA routine
Userform properties are set to 'Enabled' = true .... 'Modal' = false
Listbox properties are Visible=true, ... Enabled = true , ... Locked = false
The userform initialization code is:
ListBox2.ColumnCount = 1
ListBox2.RowSource = "H1"
ListBox2.ControlSource = "H1"
ListBox2.SetFocus
ListBox1.ColumnCount = 1
ListBox1.RowSource = "I1"
ListBox1.ControlSource = "I1"
ListBox1.SetFocus
Exit Sub
Issue
-- when the form is FIRST called .. the listboxes are blank ... as nothing has yet been written to H1 and I1 by the main routine program
-- when the main routine FIRST populates these H1 & I1 cells ( via code as shown below ) , the listboxes update with the two values
-- ( H1 is a static value that will never change once its been set in )
--- I've tried a million things, but nothing will ever get the User Form list-box to re-update from its original entered value of " 1 " in cell I1, even though the value of cell I1 has been physically changed in the excel cell by the main routine in its " while-wend " loop of the Nr of items so far actioned ... " UNLESS " that is, that after ' Do Events ', that I unload the userform .. and then immediately load it back up .. but then the box is flicking constantly on-off the screen which is not great to the users eye
The main sequence code in the while-wend loop that populates the cells is as below
... any help on how to make list box 1 update when I change the value of cell I1 is vastly appreciated
Matching_Row_Nr.Show
Range("H1").Select
ActiveCell.Value = "" + NrMatchingRows + ""
Range("I1").Select
ActiveCell.Value = "" + ThisMatchingRowNr + ""
Matching_Row_Nr.Repaint
DoEvents