Export Data to Excel Example Array Arguments

Export Data to Excel Example Array Arguments

“Export Data to Excel Through OLE Automation: A 10-Minute Solution” says:

“Refer to the section of the description: … Create a function called GetColumns, which accepts two arguments, a datawindow and an unboundstring array by reference, then add the following code:”

My question is: How can you pass an unbound string to a function? It is not supported in the argument type list. I am using PB 6.0.

If you look carefully at the dropdown list of argument types, you will see it is an editable dropdown. PB only lists the most common types. You can type anything you like in there.

For passing an unbound array, you just need to put [] after the argument name exactly as you would in declaring a local variable.


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist