Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Display Cell vals in a Textbox

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Parker Hannifin Corporation
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a workbook that goes and does a match in a different workbook based on entered cell info. I then want to grab the cell contents and somehow display them in the first workbook, perhaps in a textbox. I don't have a userform setup, and I'd rather not if I don't have to. I tried running a macro and copying and pasting the cell contents into a drawn textbox(See Below) but I can't figure out how to do it with code.

    ActiveSheet.Shapes("Text Box 1").Select
    Selection.Characters.Text = "123456"

    I know that I can't use ActiveSheet.Shapes("Text Box 1").print, because it throws up an error that this object doesn't support that function.

    What's the easiest way to create a list like this? I'm going to drop between 10 and 20 values into it, and if possible, I'd like it to only appear when I ask for it.

    Thanks!!
    Steve-O

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try creating a text box and linking it to a cell. To do so select the text box, then enter =a1 in the formula bar. In cell a1 you can use formulas to obtain results from your lookups, match, etc. In your code, you can make the text box visible or invisible with the command: ActiveSheet.Shapes("Text Box 1").visible = true/false.
    It's never too late to learn something new.

    Ricky

  3. #3
    New Member
    Join Date
    May 2002
    Location
    Parker Hannifin Corporation
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    So I tried something new, and I have a userform with a combobox and a textbox.

    I figured how to drop the values, but now what's the best way to Drop to the next line and add Another line with new info? If I just use
    UserForm1.ComboBox1.Text = "Tool 1 is located "

    ..it just replaces the text in there.

    How do I get it to Append to the info already in the combo/text box?

    Thanks again!
    -Steve-O

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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