![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Location: Parker Hannifin Corporation
Posts: 2
|
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 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
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 |
|
New Member
Join Date: May 2002
Location: Parker Hannifin Corporation
Posts: 2
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|