English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how to set focus on msoControlEdit using VBA Excel 2000?

Below code generates an error.

Application.CommandBars(cCommandBarID).Controls("GetCompanyEstimates").SetFocus

2006-09-04 21:12:58 · 2 answers · asked by padam_india 1 in Computers & Internet Programming & Design

2 answers

what is that error.. mostly you must not be getting commandbars object.... well if you've got d commndbars object then u can use looping to search perticualr button with its tag/name and then focussing..
better if u can post a code..

2006-09-05 21:44:47 · answer #1 · answered by Krex 3 · 0 0

From where did you got this control?
What is its name in code?
Is it from Fm20.dll controls
from which OCX file do you got it?
Why did you used CommandBars to access it?
You should access it fro its name

SetFocus should work on any control that can accept focus and has the property to TRUE

I need you to answer these questions, contact me through Yahoo! and send me your address if you want me to send you the solution.

Wao, that is a deep question

Read my profile, I am XLMan

2006-09-05 19:29:36 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers