G
GS
Clif McIrvin used his keyboard to write :
I meant editing the value when you want to use the code for a new
number of digits. Ergo>>edit>>run!
If you mean use a named range on the wks then that's easier than
editing a defined name value, but still not portable with the code.
Basically!
I tend to make reusable code as friendly as possible, though, and so
I'd likely prompt myself for the number of digits to format to. In this
case I'd use Rick's idea of implementing the String() function for
constructing the format string.<g>
You just lost me .... changing a constant at runtime??? Don't you mean
compile time?
I meant editing the value when you want to use the code for a new
number of digits. Ergo>>edit>>run!
My thinking was with a worksheet defined value, there would be no need to
open the VBE to change the parameter.
If you mean use a named range on the wks then that's easier than
editing a defined name value, but still not portable with the code.
*AND* the defined name isn't as
Very true. The choice of solution depends greatly on developer preference
and the specific characteristics of the work environment, doesn't it?!
Basically!
I tend to make reusable code as friendly as possible, though, and so
I'd likely prompt myself for the number of digits to format to. In this
case I'd use Rick's idea of implementing the String() function for
constructing the format string.<g>