You can call a sub but not a function in a macro. You won't get an error if you specificy the function name, but nothing will happen. So you have to call a sub. Use a variable to store your parameter and have the macro use the variable. If you want you can have the sub call the function and pass the value from the variable as parameter to the function.