LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 747
Default Popup commandbar and Setfocus

I want to call a popup type commandbar and have it set the focus to a
control. The control is of type msoControlEdit. This does not seem to be
possible. Example code:

Dim cb As Commandbar
Set cb = Application.Commandbars("XYZ")
cb.Controls(3).Setfocus
cb.ShowPopup
'cb.Controls(3).Setfocus 'Alternatively place it here

My take on this is that it fails because you can't set the focus to an
invisible control and the controls are all invisible before the commandbar is
made visible with the ShowPopup method. If the SetFocus line follows the
ShowPopup line then it does not execute until the commandbar is dismissed, at
which point the controls are all invisible again.

Hoping I'm mistaken somehow or there is a workaround.

Greg
 
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
MSG BOX PREVENTS setfocus HELP helpless in iowa Excel Programming 6 January 18th 05 12:30 PM
setfocus Dean Reardon Excel Programming 2 December 15th 04 12:18 PM
How Do I Get SetFocus To Work??? Minitman[_4_] Excel Programming 3 November 13th 04 09:18 PM
How to force repaint of popup commandbar? RB Smissaert Excel Programming 0 December 17th 03 01:59 PM
TextBox.SetFocus steve Excel Programming 4 July 16th 03 07:40 PM


All times are GMT +1. The time now is 06:53 AM.

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"