Create a pop-up when a text box is selected

terry16202

New Member
Joined
Dec 11, 2007
Messages
4
I am trying to get a second text box to pop-up when a specific visible text box is selected. To better explain, I have a table on sheet 1:

ScreenShot018.jpg


Sheet 1 also contains the 5 visible text boxs with the names in column A. If I select TextBox60, I would like TextBox61 to appear or become visible. The table of names will grow. I have tried messing with simplified code but can't get it to work:

Private Sub Worksheet_Selection(ByVal target As String)

selected_textbox = Selection.Name

If Left(selected_textbox, 4) = "Text" Then
ActiveSheet.Shapes("TextBox 61").Visible = False
Else
ActiveSheet.Shapes("TextBox 61").Visible = True
End If
End Sub

Any suggestions would be greatly appreciated.

Thanks,
Mike
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
It's possible - but it's ugly.
Maybe I'm just too tired, but I can't figure out where you got that event.. it's not one as far as i remember.
Anyway - you probably should take a step back and look at this another way. WHY do you need so many textboxes?? Are they pretty much all the same? Is there a better solution to what you need?
 
Upvote 0
That was kind of what I thought. I created a fairly large flowchart using text boxes in excel because of the large workspace. I need the mobility of the text boxes vs. cells, so that I can easily rearrange if needed. I was looking to do what I described above, so I could add notes to a particular step in the flowchart that would appear only when you click on the box.... I think I can come up with a work around.... just won't be as pretty. :wink:

Thanks!
 
Upvote 0
Could you use cells if you didn't need to rearrange?? Could use have one sheet with all your text and use cell addresses to arrange your flow chart?
Then you could use comments for your "pop ups"
What version of Office are you using?

I am just so not a fan of putting controls on sheets - especially so many controls. Years of Excel bugs that would re-arrange those controls..
 
Upvote 0
What does a textbox mean to you? How do these textboxes relate to the data in column A?

Also, what is this worksheet_selection procedure? How does it get used?
I am trying to get a second text box to pop-up when a specific visible text box is selected. To better explain, I have a table on sheet 1:

ScreenShot018.jpg


Sheet 1 also contains the 5 visible text boxs with the names in column A. If I select TextBox60, I would like TextBox61 to appear or become visible. The table of names will grow. I have tried messing with simplified code but can't get it to work:

Private Sub Worksheet_Selection(ByVal target As String)

selected_textbox = Selection.Name

If Left(selected_textbox, 4) = "Text" Then
ActiveSheet.Shapes("TextBox 61").Visible = False
Else
ActiveSheet.Shapes("TextBox 61").Visible = True
End If
End Sub

Any suggestions would be greatly appreciated.

Thanks,
Mike
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top