Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. XL VBA Question re Text Boxes

XL VBA Question re Text Boxes

Scheduled Pinned Locked Moved Visual Basic
questiondata-structureshelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dalek Dave
    wrote on last edited by
    #1

    I want an input from UserForm1 to be a Number. I want to carry that number into UserForm2. If, say that figure was 3, then I want either... Three TextBoxes to open/be visible, OR I want to ask for input on the Same TextBox 3 times, assigning each value to an array. What I have at the mo is this... UserForm one has a Text box asking for tbNumberOfUnits, and an Enter Button. On Enter it checks that the value is a number not text, throws exception. Assuming it is ok, it calls UserForm2 by "UserForm2.Show" There is a CommandButton Begin on UserForm2 At this point I would like the value of tbNumberOfUnits to be called, but it appears not to exist in UserForm2. Also, How do I create TextBoxes to the Desired amount? Any help/pointers would be appreciated, I have checked a couple of books and can't seem tofind what I want, and also feel I may not be asking the right questions from Google.

    ------------------------------------ We hang the petty thieves and appoint the great ones to public office. - Aesop

    S 1 Reply Last reply
    0
    • D Dalek Dave

      I want an input from UserForm1 to be a Number. I want to carry that number into UserForm2. If, say that figure was 3, then I want either... Three TextBoxes to open/be visible, OR I want to ask for input on the Same TextBox 3 times, assigning each value to an array. What I have at the mo is this... UserForm one has a Text box asking for tbNumberOfUnits, and an Enter Button. On Enter it checks that the value is a number not text, throws exception. Assuming it is ok, it calls UserForm2 by "UserForm2.Show" There is a CommandButton Begin on UserForm2 At this point I would like the value of tbNumberOfUnits to be called, but it appears not to exist in UserForm2. Also, How do I create TextBoxes to the Desired amount? Any help/pointers would be appreciated, I have checked a couple of books and can't seem tofind what I want, and also feel I may not be asking the right questions from Google.

      ------------------------------------ We hang the petty thieves and appoint the great ones to public office. - Aesop

      S Offline
      S Offline
      Sarani Ravindran
      wrote on last edited by
      #2

      Hi, Based on my understanding you want to pass value from one form and generate textbox dynamically.So you can have a global variable and store value in tat variable from userform1.and in the page load of userform2 generate as number of textboxes dynamically using for loop.Otherwise get input as many times and get in an array.Store the values in the DB by using arr(0),arr(1)... like that. pls free to ask again if i have misunderstood your problem.

      Believe!Success is always yours.

      D 1 Reply Last reply
      0
      • S Sarani Ravindran

        Hi, Based on my understanding you want to pass value from one form and generate textbox dynamically.So you can have a global variable and store value in tat variable from userform1.and in the page load of userform2 generate as number of textboxes dynamically using for loop.Otherwise get input as many times and get in an array.Store the values in the DB by using arr(0),arr(1)... like that. pls free to ask again if i have misunderstood your problem.

        Believe!Success is always yours.

        D Offline
        D Offline
        Dalek Dave
        wrote on last edited by
        #3

        That is it in a nutshell.

        ------------------------------------ We hang the petty thieves and appoint the great ones to public office. - Aesop

        S 1 Reply Last reply
        0
        • D Dalek Dave

          That is it in a nutshell.

          ------------------------------------ We hang the petty thieves and appoint the great ones to public office. - Aesop

          S Offline
          S Offline
          Sarani Ravindran
          wrote on last edited by
          #4

          can you give me your requirement with your code

          Believe!Success is always yours.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups