Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How can I find a handle number of controls on Userform?

Hello everyone,

I knew how to find a handle number of userform or application object.
as following:
------------------------------------------------------------------------------------------------
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Dim h As Long

h = FindWindow(vbNullString, Application.Caption)
If h = 0 Then
MsgBox "Sorry, I could not find that window"
Unload Me
Else
MsgBox "The Handle to that Window is: " & h
End If
------------------------------------------------------------------------------------------------
but I want to know how to find a handle number of an image control on the Userform.

How can I find a handle number of controls on the Userform?


Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default How can I find a handle number of controls on Userform?


All of the MSForms ActiveX controls are windowless, so they don't have
window handles that you can acquire in this manner.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"sjoo" wrote in message
...
Hello everyone,

I knew how to find a handle number of userform or application object.
as following:
----------------------------------------------------------------------------
--------------------
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long

Dim h As Long

h = FindWindow(vbNullString, Application.Caption)
If h = 0 Then
MsgBox "Sorry, I could not find that window"
Unload Me
Else
MsgBox "The Handle to that Window is: " & h
End If
----------------------------------------------------------------------------
--------------------
but I want to know how to find a handle number of an image control on the
Userform.

How can I find a handle number of controls on the Userform?


Thanks in advance



Reply
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
Excel 2007: mouse cant find cell handle to drag/move Carl Henthorn Excel Discussion (Misc queries) 4 April 30th 23 03:44 AM
Number of Decimals Excel can Handle Nicolas Cachanosky Excel Discussion (Misc queries) 1 December 4th 07 02:52 PM
How do I handle error conditions with the FIND command? mywebaccts (at) PLUGcomcast.net Excel Worksheet Functions 6 August 5th 07 12:14 AM
Limit of number which sin() can handle? Lafayette Excel Worksheet Functions 3 March 8th 06 06:57 PM
What order does VBA look at userform controls? Brad Patterson Excel Programming 3 July 17th 03 03:46 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"