+ Reply to Thread
Results 1 to 13 of 13

Need help creating pop up box that displays information from box to table

  1. #1
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Need help creating pop up box that displays information from box to table

    I'm trying to create a box in excel 2010 that when it pops up it gives you 3 textboxes to enter information. How I have it laid out in my head is like this (the 'Add to Table' & 'Exit' are buttons that will be in the box:


    Column: [TextBox1]

    Rows:[TexBox2] to [TextBox3]

    {Add to Table} {Exit}


    After information has been added to the table, I want the box to be cleared so that I can enter in the next set of numbers. I also need the table to get larger as each set of numbers is added because sometimes there will be more rows than other times. I don't want the table more than 5 columns wide, so after I enter my 5th set of numbers, I want it to move to the next row and start over in the 1st column. For example:

    ColumnA ColumnB ColumnC ColumnD ColumnE
    1st set 2nd set 3rd set 4th set 5th set
    6th set 7th set




    I appreciate any help that can be offered for this. Thanks!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help creating pop up box that displays information from box to table

    Setting this up isn't hard but I can't make head nor tails out of your description. You start out well by showing what layout on the form you want, which is very clear. Then all of a sudden you say, "After information has been added to the table," and "each set of numbers." All you specified is a column and a range of rows. What information? What table? What set of numbers? How does the information provided on the form relate to wanting to fill the columns left to right then move to the next row?

    Here is a file that gets it started but there is too much missing in your description to finish it. I have shown textboxes because that's what you asked for but it would be better to use listboxes or comboboxes. Then you don't have to validate the user's input.
    Attached Files Attached Files
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    Sorry for not being more clear about what I was wanting the box to do. I want to be able to enter a letter into the column textbox and then numbers into the row textboxes. Using the previous layout, it would look like this:

    Column: [A]

    Rows:[1] to [37]

    {Add to Table} {Exit}



    When I hit 'Add to Table', I want the information to go to the table and then clear the information from the boxes so that I can enter the next set of information. After multiple entries, the table would look like this:

    ColumnA ColumnB ColumnC ColumnD ColumnE
    A1 to A37 B1 to B37 D1 to D37 E1 to E37 F7 to F37
    H1 to H10 H17 to H37

    6StringJazzer mentioned using listboxes or comboboxes. I'm open to the idea, but I want to make sure that it includes all possible options. For example, I would need the columns to go into the double letter alphabet (AA, BB, etc) and the numbers would need to go up to 500 just to be sure that I had more than needed. Please let me know if you need more information. Thanks again for all the help!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help creating pop up box that displays information from box to table

    Ah, that example is much better. So the column and row ranges are the information that is to be put into the cells. I thought it was somehow telling what cells to use. The example is very helpful.

    This will accept any valid cell, from A1 to XFD1048576. It uppercases the column letters.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    Thanks that worked exactly as I was picturing in my head!

  6. #6
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    You had mentioned using the listboxes or comboboxes. Is that still an option for what I'm wanting to do? Or no?

  7. #7
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    I'm trying to add a line to the code that you gave me, but I'm trying to figure out where it goes. I want to add a row after each time the column get to "E". Mind helping me out again? >.<

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help creating pop up box that displays information from box to table

    It's an option but I don't think it's a very good one. To allow 500 rows, plus all columns with double letters, that's 676 columns--those numbers would make for listboxes that are very unwieldy for the user. I guess you could use two listboxes, one for the first letter and one for the second. But with so many choices I felt it was better to go with textboxes with validation. The validation isn't that difficult. I don't know if you tried giving any invalid specifications but the user will get error messages when that happens.

  9. #9
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help creating pop up box that displays information from box to table

    Quote Originally Posted by ddouget1 View Post
    I'm trying to add a line to the code that you gave me, but I'm trying to figure out where it goes. I want to add a row after each time the column get to "E". Mind helping me out again? >.<
    Every time the row is filled to column E, the next set of values already starts in the next row. I'm not sure what you mean.

  10. #10
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    Basically I have the information displayed like this:

    A1 to A10 B1 to B10 C1 to C10 D1 to D10 E1 to E10

    Verify correct column numbers and placement



    When I go to add the next set of numbers which would be F1 to F10 in this example, I'm wanting it to add a row so that the spacing doesn't change between my listed numbers and the line "Verify correct column numbers and placement". So it would then look like:

    A1 to A10 B1 to B10 C1 to C10 D1 to D10 E1 to E10
    F1 to F10

    Verify correct column numbers and placement


    This way every time it's going to move to the next row, it inserts another row.
    Last edited by ddouget1; 10-09-2013 at 10:29 AM.

  11. #11
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    Also, when I try using "Y" or "Z" in the column text box, I get the error that says it is not a valid column specification. Any ideas on what to do with that?
    Last edited by ddouget1; 10-09-2013 at 10:39 AM.

  12. #12
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Need help creating pop up box that displays information from box to table

    It is much more efficient to provide a complete description of what you want to do the first time...This version inserts a line to keep moving your text down.

    I also corrected the problem with column letter validation. The logic for string comparisons wasn't correct.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    08-20-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Need help creating pop up box that displays information from box to table

    Sorry about that. I didn't plan on adding things after the fact, but as I'm actually getting to use the code, I'm seeing these other things that I wanted it to do. I'll try to be more clear in the future. Is there any way that you can explain to me what the code does? I've only done self-teaching with VBA and macros in excel, and I'm just trying to understand how the code works. I appreciate any support you can give. Thanks again for the help!
    Last edited by ddouget1; 10-10-2013 at 08:55 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 06-11-2013, 02:16 PM
  2. Replies: 7
    Last Post: 02-14-2013, 01:32 PM
  3. Replies: 2
    Last Post: 09-16-2012, 04:39 PM
  4. How do I make a form that displays rows of information?
    By dustinsroberts in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-14-2011, 04:55 PM
  5. [SOLVED] text box for displays of information in excel cells
    By eugene in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-03-2006, 11:58 AM

Tags for this Thread

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