ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   syntax for variable (https://www.excelbanter.com/excel-programming/350948-syntax-variable.html)

adamaagard

syntax for variable
 
What is the syntax for declaring variabls in VBA functions that may or may
not be filled?

Example:

Function Jim(a,b,c,?,?,?) where ? are variables that may or may not be filled

Thanks

Bob Phillips[_6_]

syntax for variable
 
Look up ParamArray in help, and this previous post http://tinyurl.com/c65h3

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"adamaagard" wrote in message
...
What is the syntax for declaring variabls in VBA functions that may or may
not be filled?

Example:

Function Jim(a,b,c,?,?,?) where ? are variables that may or may not be

filled

Thanks




RB Smissaert

syntax for variable
 
I think what you need is the keyword Optional:

Function Jim(a,b,c,Optional d,Optional e,Optional f)

RBS


"adamaagard" wrote in message
...
What is the syntax for declaring variabls in VBA functions that may or may
not be filled?

Example:

Function Jim(a,b,c,?,?,?) where ? are variables that may or may not be
filled

Thanks




All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com