Results 1 to 28 of 28

Progressive Count

Threaded View

  1. #12
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Progressive Count

    Hi Rob,

    Some good questions there.
    Why are you defining the count variable as a Double (instead of Long)?
    When I was writing the code I knew that the count variable would end up being put on (or added to) a worksheet. All numbers on worksheets are Double data types, so I declared it as one. The code assumes that A11 contains a number (or a value which can be coerced to a number) otherwise an error will be raised.
    ditto for using the "#" sign on the end of the 1 & the end of the 0?
    As you know, # is the type declaration character for a Double data type. In the VBA IDE, if you type 1 in your code it will be read as an Integer. If you type 1# in it will be read as a Double. Since I am either adding or comparing Doubles, I used #.

    Normally I wouldn't use type declaration characters on forum posts because I think they make the code more confusing to people.
    Last edited by Colin Legg; 05-13-2011 at 04:31 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1