All Forums >> [Scripting] >> Post a VBScript >> Excel - converting numbers to leters *Fixed* Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
* Thanks to the feedback from Ebgreen I fixed the problem
What this script does it allow you to use objExcel.Range Statements with variable column widths. Basically all it does is covert a number into the weird alpha system used by excel. For example the function would convert the number 27 into AA.
< Message edited by geek_01 -- 7/27/2006 10:21:24 AM >
Thanks for sharing your code with us. I personally hate the way that excel does columns. Just a couple of quick comments.
Commenting your code will make it much easier for others to get the maximum benefit from it.
Dimming all of your variables within the function will increase its encapsulation and make it much easier to re-use.
You should always test boundary conditions when you write code. In the case of this function, it fails for all multiples of 26. Here is the code that I used to test it: