WinAPI Functions

  • Thread starter Thread starter solex
  • Start date Start date
S

solex

Is it possible to use WinAPI functions such as SendMessage. I would like to
use this API for searching for items in a listbox but cannot find the HWND
property. In addition I would like to create some control utilities but
everytime I try to pass an instance of a control I get a type mismatch
because the control is NULL.

Thanks,
Dan
 
Dan,

I don't believe it is possible to send messages to controls on a
userform because these are windowless controls and don't have an
hWnd property.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Chip,

With regards to my other question how does one go about creating a control
library if you cannot pass control to and from routines.

Thanks,
Dan
 
Dan,

I'm not sure what your second question is, but you can certainly
pass a control reference to procedures. For example,

Sub DoSomething(CBX As MSForms.ComboBox)
' do something ith CBX
End Sub

You can then call this with code like

DoSomething CBX:=Me.ComboBox1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
So this is also why I'm pulling my hairs out on the question how to add an
icon to a UserForm?

hans
 
Back
Top