I have a standard button on a Base form which I want to use to open a file. The file path comes from a textbox on the form. When the button is clicked, I want to call
which is a generic sub I created that takes a textbox as its parameter and opens the file given in that text box. However, when I assign the openFile sub to the “Mouse button pressed” event for the button, I can’t give it any parameters. I looked at this topic, which has a similar discussion for Calc, and the solution there suggests passing the parameter to a function and calling that function from within the sub. However, Base’s “assign macro” feature doesn’t seem to allow passing arguments to functions, either.
Is there a way to do such a thing in Base?