Re: Dynamic Function Calls

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Marsh,

Thanx! It worked great. I used the following code in the On_Open

With Me("ctl" & intX & "_" & intY)

.OnClick = "=findDisc(" & intX & "," & intY & ")"

End With

Woody

"Marshall Barton" wrote:

Grwffyn wrote:
This is a one-time (whenever the user wants a change to the matrix)
procedure that can only be accessed by the programmers.

The function call has to change for each button so it would be

findDisc(0,0) for the button named ctl0_0
findDisc(0,1) for the button named ctl0_1
etc.

I tried to use: "=findDisc(" & inty & "," & inty & ")" since I want each
button to have different parameters for the function.


That should work:

frm("ctl" & intx & "_" & inty) = _
"=findDisc(" & intx & "," & inty & ")"

If findDisc is in a standard module, make sure it's Public

--
Marsh
MVP [MS Access]

.


Quantcast