PC Review


Reply
Thread Tools Rate Thread

display cell contents

 
 
=?Utf-8?B?SlQ=?=
Guest
Posts: n/a
 
      13th Sep 2007
On my worksheet, are 3 hidden columns. One of the columns contains an ID
Number (for a cost center). Originally the columns were hidden because there
would only be 1 ID. Now, the data has been expanded to include multiple IDs.
But I still need to have the columns hidden.

FYI........the right click is already being used for something else.

I would like to display the ID when the user moves the cursor over any line
with data (like a control tip). Is this possible? If so any help getting
started would be appreciated. Any suggestions on other ways to accomplish
this would be appreciated as well. As always, "Thanks" for the help....

--
JT
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      13th Sep 2007
are you talking about selecting a cell with a row or are you talking about
hovering the mouse over a cell (probably not easily doable)?

If selecting, then use the SelectionChange event

--
Regards,
Tom Ogilvy


"JT" wrote:

> On my worksheet, are 3 hidden columns. One of the columns contains an ID
> Number (for a cost center). Originally the columns were hidden because there
> would only be 1 ID. Now, the data has been expanded to include multiple IDs.
> But I still need to have the columns hidden.
>
> FYI........the right click is already being used for something else.
>
> I would like to display the ID when the user moves the cursor over any line
> with data (like a control tip). Is this possible? If so any help getting
> started would be appreciated. Any suggestions on other ways to accomplish
> this would be appreciated as well. As always, "Thanks" for the help....
>
> --
> JT

 
Reply With Quote
 
Bill Renaud
Guest
Posts: n/a
 
      13th Sep 2007
Try this for a starter idea. Paste the following event code into the
worksheet code module. When you double-click a cell, it toggles Status
Bar info on and off. Then select a cell, the info will appear on the
Status Bar. Double-click any cell again to toggle Status Bar reporting
off. The following code just uses column $A for its info. This avoids
having MsgBoxes popping up at each selection change.

Private blnStatusMsgOn As Boolean

'----------------------------------------------------------------------
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)

blnStatusMsgOn = Not blnStatusMsgOn
Worksheet_SelectionChange ActiveCell
End Sub

'----------------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim rngColA As Range

Set rngColA = Target.EntireRow.Resize(1, 1)

If blnStatusMsgOn _
Then
Application.StatusBar = "Info is '" & rngColA.Value & "'."
Else
Application.StatusBar = False
End If
End Sub

--
Regards,
Bill Renaud



 
Reply With Quote
 
JW
Guest
Posts: n/a
 
      13th Sep 2007
Since you are wanting to have something resembling a tooltip, you
could use a comment. Through VBA, you could assign a comment to all
of the cells within the row and set the comment equal to the range
that contains the info you want displayed. Just something yo get your
creative juices flowing:
ActiveCell.AddComment.Text "Product Number:" & Chr(10) &
Cells(ActiveCell.Row, 1)
Bill Renaud wrote:
> Try this for a starter idea. Paste the following event code into the
> worksheet code module. When you double-click a cell, it toggles Status
> Bar info on and off. Then select a cell, the info will appear on the
> Status Bar. Double-click any cell again to toggle Status Bar reporting
> off. The following code just uses column $A for its info. This avoids
> having MsgBoxes popping up at each selection change.
>
> Private blnStatusMsgOn As Boolean
>
> '----------------------------------------------------------------------
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
> Cancel As Boolean)
>
> blnStatusMsgOn = Not blnStatusMsgOn
> Worksheet_SelectionChange ActiveCell
> End Sub
>
> '----------------------------------------------------------------------
> Private Sub Worksheet_SelectionChange(ByVal Target As Range)
> Dim rngColA As Range
>
> Set rngColA = Target.EntireRow.Resize(1, 1)
>
> If blnStatusMsgOn _
> Then
> Application.StatusBar = "Info is '" & rngColA.Value & "'."
> Else
> Application.StatusBar = False
> End If
> End Sub
>
> --
> Regards,
> Bill Renaud


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display contents of active cell in another cell? Woodstock Microsoft Excel Misc 1 20th Mar 2009 09:16 PM
display contents of cell if adjacent cell equals Travis Microsoft Excel Worksheet Functions 1 7th Jun 2008 02:34 PM
Cell contents-display extends into next cell (???) terry b. Microsoft Excel Discussion 3 22nd Oct 2006 03:53 PM
Display contents of cell in another cell as part of text string? mschmidt@carolina.rr.com Microsoft Excel New Users 3 8th Jul 2006 07:44 PM
DISPLAY THE CONTENTS OF A CELL IN ANOTHER CELL DEPENDANT UPON THE. =?Utf-8?B?Z2VybWFueQ==?= Microsoft Excel New Users 1 24th Aug 2004 09:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 PM.