View Single Post
  #21   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Spliting digits up to fit paper form

Clif McIrvin used his keyboard to write :
"GS" wrote in message ...


*However*, it would be harder to update than changing a constant at
runtime,


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. Ergoeditrun!

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
portable as is the code!<g


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

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc