Jump to content

How to call method


Recommended Posts

Hello,

I have this function to launch the application:

Public Function OpenApplication(exePath)
        SystemUtil.Run exePath

OpenApplication = 1
End Function

'Calling the function works.

url = "examplesite.com"

aa = OpenApplication(url)

'Instead of calling from the script, I would like to move the function and parameter in excel. So, in excel, I have two columns: method and parameter

My script goes to excel, read the method and parameter then make the call. I get type mismatch error at the last line myMethod(myParam).

	myMethod = SheetOne.Cells(2, 3)
	myParam = SheetOne.Cells(2, 4)
	myMethod(myParam)

Please advise. 

Edited by newcoder1010
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...