Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2006

Tip: Looking for answers? Try searching our database.

passing arguments to events

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 24 May 2006 14:27 GMT
Hello and goodmorning, I don't know if this is possible but I would like to
pass an object to an event. I want to do something like this:
sub main()
dim somearray(50) as string
... other code

call commandbutton_Click(byval somearray())
... other code
end sub

private sub commandbutton_Click(somearray() as string)
... code goes here
end sub

my problem is that when I do this it says that there is a duplicate private
sub commandbutton_Click(somearray() procedure and wrong number of arguments.
I am wondering what I can do. Maybe a class? I am not sure what I can do. Any
help would be greatly appreciated.
Paul
PS Any additional information you may need please let me know and I will
provide it.
Ivan Raiminius - 24 May 2006 15:06 GMT
Hi Paul,

setting public variable dimensioned in top of regular module might be a
way.

Regards,
Ivan
Paul - 24 May 2006 15:18 GMT
Thanks for the suggestion but I am try to put my code into a dll and I can
seem to get the dll to recognize the public array. It just bombs. I know this
is an unusual request. but the search continues. :) thanks for your help.
Paul

> Hi Paul,
>
[quoted text clipped - 3 lines]
> Regards,
> Ivan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.