Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Listbox on a User Form. Another form has gotten the user's
selection. I then transfer their selection to this Listbox with: lbxTerr.Selected(i) = True But the focus inside the Listbox is still on the first item. This isn't a big deal, but I'd rather not have the faint dashed line around the first selection. So what puts the focus on the item that I just set to true? Don <www.donwiss.com (e-mail link at home page bottom). |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe...
lbxTerr.topindex = i or maybe lbxOtherLB.topindex = lbxTerr.topindex Don Wiss wrote: I have a Listbox on a User Form. Another form has gotten the user's selection. I then transfer their selection to this Listbox with: lbxTerr.Selected(i) = True But the focus inside the Listbox is still on the first item. This isn't a big deal, but I'd rather not have the faint dashed line around the first selection. So what puts the focus on the item that I just set to true? Don <www.donwiss.com (e-mail link at home page bottom). -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 24 Aug 2006, Dave Peterson wrote:
Don Wiss wrote: I have a Listbox on a User Form. Another form has gotten the user's selection. I then transfer their selection to this Listbox with: lbxTerr.Selected(i) = True But the focus inside the Listbox is still on the first item. This isn't a big deal, but I'd rather not have the faint dashed line around the first selection. So what puts the focus on the item that I just set to true? Maybe... lbxTerr.topindex = i I tried this. While it didn't move the focus, it did bring into view the selection when it was not in view. So it was a very useful addition. I ended up not running it when the selection was in view. I could have, and that would have pushed the faint dashed line out of view. or maybe lbxOtherLB.topindex = lbxTerr.topindex I didn't figure out just what this suggestion was. I communicated a bit with the support place my company hires. He determined it would require APIs and finding the handle. Way overkill for what is basically a cosmetic issue. Don <www.donwiss.com (e-mail link at home page bottom). |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
or maybe
lbxOtherLB.topindex = lbxTerr.topindex I didn't figure out just what this suggestion was. If lbxTerr showed element N, I thought that maybe you wanted to have your other listbox (delightfully named lbxOtherLB) to show the same. Don Wiss wrote: <<snipped -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Fri, 25 Aug 2006, Dave Peterson wrote:
or maybe lbxOtherLB.topindex = lbxTerr.topindex I didn't figure out just what this suggestion was. If lbxTerr showed element N, I thought that maybe you wanted to have your other listbox (delightfully named lbxOtherLB) to show the same. There is no other listbox. The zip code selection form has closed and it passes the state and territory to the main form. State is a combo box. A change event on it populates the territory listbox. Then it selects the territory that the entered zip code falls into. Don <www.donwiss.com (e-mail link at home page bottom). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set focus on user form | Excel Programming | |||
User Form focus | Excel Programming | |||
Modeless User Form and Worksheet Focus | Excel Programming | |||
Setting form controls focus and enter key | Excel Programming | |||
Text Box on User Form Set Focus Issue | Excel Programming |