Results 1 to 2 of 2

Thread: HELP PLEASE!!! Displaying range of numbers in word?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2005
    Location
    S.Wales (UK)
    Posts
    7

    Post HELP PLEASE!!! Displaying range of numbers in word?

    I am currently in the process of teaching myself vb6 at work and I am writing some code for batch no. labels. My form has 2 text boxes which the batch no. ranges are entered into, for ex. (001) - (050)! I have a command button, which once clicked, will list these in word! BUT!!! How can I display all the other 48 integer values in between aswell (002-049). Can anyone give me some advice or code plz!! Would be greatly appreciated.

  2. #2
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961

    Re: HELP PLEASE!!! Displaying range of numbers in word?

    Use For Loop

    VB Code:
    1. For n as Integer = Val(TextBox1.Text) to Val(TextBox2.Text)
    2.   'Wherever you want to display
    3.   Msgbox n.ToString
    4. Loop

Posting Permissions

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



Click Here to Expand Forum to Full Width