Charlotte Foust
charlotte.foust at gmail.com
Wed Jul 6 23:55:53 CDT 2011
Does your listbox have a header row? That would affect which row was the default. Charlotte Foust On Wed, Jul 6, 2011 at 9:46 PM, William Benson (VBACreations.Com) < vbacreations at gmail.com> wrote: > I have this loop which results in my 2nd listbox row being selected every > time and it annoys me. I can't figure out what is causing *any* row to be > selected. > > Debug Behavior: > Row 0 added, nothing is selected. > Row 1 added, it gets selected. > Row 2 added, Row 1 stays selected. > Row 3 added, Row 1 stays selected. > > For Each WS In WB.Worksheets > lstWS.AddItem WS.Name & ";" & > XL.WorksheetFunction.CountA(WS.Rows(1)) > Next > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > > > Website: http://www.databaseadvisors.com > > >