What form call the function?

seba64

New Member
Joined
Apr 24, 2016
Messages
32
Think that it is possible for a function to know the name of the form that called it.?

think that function can be in at unknown project of a unknown programmer.

with an object like parameter i can found the parent, but in this function i haven't any object like parameter.

I hope you understand the question.
 
Last edited:

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
you have it before the function

MsgBox me.Name
call MyFunction

or put the form in the param of the function.
Code:
public Function MyFctn(byval pfrm as form)
   msgbox pfrm.name
end function
 
Last edited:
Upvote 0
you have it before the function

MsgBox me.Name
call MyFunction

or put the form in the param of the function.
Code:
public Function MyFctn(byval pfrm as form)
   msgbox pfrm.name
end function

you are right, but what about if any people take and use that function and not put the parameter or the correct parameter (don't put the name of the correct parameter or the correct name of form at parameter)?
 
Last edited:
Upvote 0
Why would you need this?
 
Upvote 0
With respect, that doesn't really address my question. What use would it be if you have no control over the function anyway?
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top