BLOGS BY TOPIC▼
BLOGS BY AUTHOR▼
BLOGS BY YEAR▼
Posted by Andy Brown on 17 June 2019
You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.
Showing the Arguments for a VBA user-defined function
It's not often we discover a new Excel short-cut key (thanks to Wayne Edmondson for this), so we thought we'd share it!
Suppose that you've written the following excellent user-defined function in VBA:
Function Multiply(FirstNumber As Integer, _
SecondNumber As Integer) As Integer
'return the product of the two numbers
Multiply = FirstNumber * SecondNumber
This function takes two numbers, and calculates their product. You could argue that the * key does the same thing more easily ...
You then try referencing your function in your workbook, but no argument list appears:
You know you've got the function name correct, but can't remember the arguments you need to pass to it.
Step forward Ctrl + Shift + A ! When typing in formula as above you can press this short-cut key combo to bring up the arguments:
Now you can see what the arguments are!
Not earth-shattering, but it might make someone's life a little bit easier perhaps?