VBA function missing its parameters

  • Thread starter Thread starter LA Writer
  • Start date Start date
L

LA Writer

I'm creating my first VBA Excel formula in a couple years. I can pic
the formula in the list of available functions, but the function'
parameter is not visible. If I assign the formula to the cell anyway
the cell only shows: #NAME?

So, even when I pick the formula from the module, Excel complains abou
the name.

For example, the formula in the cell looks like:
=test.xls!Module3.DoubleText()
I can force a parameter into the function call,
=test.xls!Module3.DoubleText("abc")
but it doesn't matter since Excel doesn't see the parameter in th
function definition.

The example function is:
Function DoubleText(text As String) As String
DoubleText = text & text
End Function

Please help. How do I add a new VBA function with parameters?

Thanks
 
Turns out this was probably a Macro security issue... But I'm not sure,
since I shouldn't have to exit Excel to change the security settings.

All I know is that my formulas are working now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top