Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default WinAPI Functions

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default WinAPI Functions

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

"solex" wrote in message
...
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default WinAPI Functions

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

"Chip Pearson" wrote in message
...
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

"solex" wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default WinAPI Functions

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



"solex" wrote in message
...
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

"Chip Pearson" wrote in message
...
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

"solex" wrote in message
...
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








  #5   Report Post  
Posted to microsoft.public.excel.programming
mct mct is offline
external usenet poster
 
Posts: 4
Default WinAPI Functions

So this is also why I'm pulling my hairs out on the question how to add an
icon to a UserForm?

hans

"Chip Pearson" schreef in bericht
...
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

"solex" wrote in message
...
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






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
Multiple functions, conditional functions HeatherBelle Excel Worksheet Functions 7 October 17th 08 03:57 PM
How to convert cell formula functions to code functions Adnan Excel Discussion (Misc queries) 1 October 1st 08 08:30 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


All times are GMT +1. The time now is 12:46 PM.

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"