Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Floating Text Box help

Hello I have a question on how to execute what in my mind is easy to conceive
but hard to execute. I have a Test Case spreadsheet and I want to implement a
way for it to appear more streamlined.

What I want to implement is a floating text box that only appears when the
user highlights one of the cells. This floating text box should appear in the
middle of the screen and only appear when the user highlights one of the
cells on the Excel Spreadhsheet.

Can anyone help me with this?

Thank You

Ty Barrett
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7,247
Default Floating Text Box help

The simplest way is to create a UserForm with a text box on it, and use the
SelectionChange event to display or hide the form based on the cell selected
by the user. For example, the following code in the Sheet1 module will
display the form if the user clicks in the range name "TheRange" and hide
the form when the user selects a cell outside that range.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then
Exit Sub
End If
If Not Application.Intersect(Range("TheRange"), Target) Is Nothing Then
UserForm1.Show vbModeless
Else
UserForm1.Hide
End If
End Sub


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

"Ty Barrett (VMC)" <Ty Barrett wrote in
message ...
Hello I have a question on how to execute what in my mind is easy to
conceive
but hard to execute. I have a Test Case spreadsheet and I want to
implement a
way for it to appear more streamlined.

What I want to implement is a floating text box that only appears when the
user highlights one of the cells. This floating text box should appear in
the
middle of the screen and only appear when the user highlights one of the
cells on the Excel Spreadhsheet.

Can anyone help me with this?

Thank You

Ty Barrett


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Floating Text Box help

Thank you very much Chip. I am going to implement this to the best of my
ability and get back to you. Thanks again for the help!

"Chip Pearson" wrote:

The simplest way is to create a UserForm with a text box on it, and use the
SelectionChange event to display or hide the form based on the cell selected
by the user. For example, the following code in the Sheet1 module will
display the form if the user clicks in the range name "TheRange" and hide
the form when the user selects a cell outside that range.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count 1 Then
Exit Sub
End If
If Not Application.Intersect(Range("TheRange"), Target) Is Nothing Then
UserForm1.Show vbModeless
Else
UserForm1.Hide
End If
End Sub


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

"Ty Barrett (VMC)" <Ty Barrett wrote in
message ...
Hello I have a question on how to execute what in my mind is easy to
conceive
but hard to execute. I have a Test Case spreadsheet and I want to
implement a
way for it to appear more streamlined.

What I want to implement is a floating text box that only appears when the
user highlights one of the cells. This floating text box should appear in
the
middle of the screen and only appear when the user highlights one of the
cells on the Excel Spreadhsheet.

Can anyone help me with this?

Thank You

Ty Barrett


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
Floating row? pause café Excel Discussion (Misc queries) 2 January 24th 07 11:47 PM
How do I create a floating text box with hyperlinks Srhodes Excel Worksheet Functions 0 August 29th 06 08:38 PM
Floating Key Mr-Re Man Excel Discussion (Misc queries) 1 March 21st 06 12:08 AM
what is floating currency bobert Excel Discussion (Misc queries) 1 January 7th 06 12:52 AM
How do I add a floating text box in Excel? Prashant Excel Discussion (Misc queries) 1 September 27th 05 01:54 PM


All times are GMT +1. The time now is 01:25 AM.

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

About Us

"It's about Microsoft Excel"