Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default show and hide a text box

i need some script that will make a text box appear when A1 is selected then
dissappear when it is deselected. the default status of the text box needs to
be hidden. is this possible and if so how?


many thanks

chris
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default show and hide a text box

Chris,

Assuming you are using the text box from the Controls command bar, put the
following code in the worksheet code module for the sheet than contains the
text box.


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.TextBox1.Visible = _
Not (Application.Intersect(Range("A1"), Target) Is Nothing)
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Christopher Buxton" wrote in
message ...
i need some script that will make a text box appear when A1 is selected
then
dissappear when it is deselected. the default status of the text box needs
to
be hidden. is this possible and if so how?


many thanks

chris


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show zero value but hide NA KateB Charts and Charting in Excel 4 June 3rd 10 03:25 AM
Show/Hide Inez Excel Discussion (Misc queries) 1 July 8th 09 03:29 PM
show hide row if Wanna Learn Excel Discussion (Misc queries) 2 May 15th 09 06:08 PM
Show or hide rows when text is bold or italic Sophisticated Penguin Excel Programming 4 December 1st 04 09:45 AM
Hide and show Cl Excel Programming 1 January 3rd 04 03:45 PM


All times are GMT +1. The time now is 07:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"