hilkoc / vbaDeveloper

Tools for development and version control of vba code
MIT License
516 stars 137 forks source link

Sub Format hides excel's Format function #25

Closed bitterjug closed 4 years ago

bitterjug commented 7 years ago

Formatter module contains public sub format(). Excel has a built-in function called Format. if I add a reference to your project (so I can call exportVbProject) I my calls to the latter are mistaken for calls to the former which causes errors.

hilkoc commented 7 years ago

That is a good point. The format function should be renamed. Any suggestions for a short and clear name? Maybe 'FormatVba()'.

For now, just use the fully qualified name i.e. ModuleName.FunctionName() to call the function. That will always work as expected.

gkuenzli commented 7 years ago

What about FormatActiveCodePane ?

Certainly not short by quite clear.

hereticbill commented 5 years ago

I hope you will fix this soon. gkuenzli's suggestion is fine: it doesn't need to be short, it only needs to not collide with the standard function. I can change it in my local copy, but it seems better to just fix it in the baseline.

yarick123 commented 4 years ago

please look at the patch https://github.com/hilkoc/vbaDeveloper/pull/43 above