0

I'm using the MultiSelect option with the Application.GetOpenFilename method in my VBA code to open mulitple text files. However, the returning array of file names is always option base 1. I'm using option base 0 throughout the rest of my code and would like all arrays be be option base 0 if possible, so as to reduce possible errors. Is there any way to set the returning array from the Application.GetOpenFilename method to be option base 0?

It's not a big deal but thought that I should ask the question.

JC_RMB
  • 99
  • 9
  • 1
    No, you cannot affect what the function returns, and it obviously ignores your option bases. You can [copy](https://stackoverflow.com/q/9086229/11683) the result into a base 0 array, or you can rebase the array in place (involves code similar to https://stackoverflow.com/a/183668/11683). – GSerg Aug 24 '19 at 11:05
  • OK, many thanks for the confirmation. I'll just have to be on my guard when I use the method and copy the result into a base 0 array. – JC_RMB Aug 24 '19 at 11:31

0 Answers0