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: 54
Default Passing a Control as an Argument

Hi,

I have a form with a label control on it. I want to pass this as an argument
to a function which does a test. The problem is that this gives me a type
mismatch on this form which calls it. If you hover the mouse cursor over the
argument which is passed to the function from the calling method in the
form, it returns a string value.

Any IDeas ?

Public Function MyFunction( myLabel as Label ) As Boolean

myLabel.Caption = "SomeString"

MyFunction = True

End Function



 
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
Passing a UDF as an argument to a UDF puff Excel Discussion (Misc queries) 3 February 23rd 06 09:46 PM
Passing argument to another Sub Roman Excel Programming 6 February 1st 05 09:17 PM
Passing Worksheet tab as an argument. Kashizzz Excel Programming 4 September 2nd 04 08:37 AM
Need help passing an array as an argument blc[_3_] Excel Programming 3 August 4th 04 10:35 PM
VBA - Passing a FUNCTION as an Argument James B Excel Programming 3 February 18th 04 03:42 PM


All times are GMT +1. The time now is 01:46 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"