Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

display cell contents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JT - 13 Sep 2007 17:12 GMT
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....

Signature

JT

Tom Ogilvy - 13 Sep 2007 17:24 GMT
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

Signature

Regards,
Tom Ogilvy

> 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
[quoted text clipped - 7 lines]
> started would be appreciated.  Any suggestions on other ways to accomplish
> this would be appreciated as well.  As always, "Thanks" for the help....
Bill Renaud - 13 Sep 2007 18:11 GMT
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

Signature

Regards,
Bill Renaud

JW - 13 Sep 2007 18:22 GMT
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)
> 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
[quoted text clipped - 30 lines]
> Regards,
> Bill Renaud
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.