By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,681 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,681 IT Pros & Developers. It's quick & easy.

Can you dynamically build a function call ?

P: n/a
Is it possible in VB to dynamically build a function call?

eg Something like:
strParams = strParam(0) & ", " & strParam(1)
strFunc = "Logon"
if not( frmMain.objMxAPI.strFunc( strParams ))
Regards,
Simon.
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Simon" <si**********@hotmail.com> wrote in message
news:03****************************@phx.gbl...
Is it possible in VB to dynamically build a function call?

eg Something like:
strParams = strParam(0) & ", " & strParam(1)
strFunc = "Logon"
if not( frmMain.objMxAPI.strFunc( strParams ))


Yes it is possible but not how you think, I would read up on Delegates:

http://msdn.microsoft.com/library/de...ClassTopic.asp

HTH,
Jeremy

Nov 20 '05 #2

P: n/a
Hi Simon,

You might also like to look up CallByName()

Regards,
Fergus
Nov 20 '05 #3

P: n/a
* "Simon" <si**********@hotmail.com> scripsit:
Is it possible in VB to dynamically build a function call?

eg Something like:
strParams = strParam(0) & ", " & strParam(1)
strFunc = "Logon"
if not( frmMain.objMxAPI.strFunc( strParams ))


Have a look at 'CallByName'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.