Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP with mouseover?
Is there any way to perform the equivalent of a VLOOKUP so that a simple
mouseover (or click) of a cell displays the data in a pop-up like format? The mainframe data at my work abbreviates everything, so unless you can remember thousands and thousands of definitions, you have to provide them in the spreadsheet somehow. Right now I have 12-15 columns of data. If I added new columns alongside what I already have for the purpose of definitions, that's at least 25 columns total, which I cannot possibly view on one (or even two or three) screens at one time. It would be great to instantly see the data by a mouseover, click, keyboard stroke sequence, or something similar. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP with mouseover?
Would adding the definitions as cell comments be acceptable?
Tim -- Tim Williams Palo Alto, CA "Cheese" wrote in message ... Is there any way to perform the equivalent of a VLOOKUP so that a simple mouseover (or click) of a cell displays the data in a pop-up like format? The mainframe data at my work abbreviates everything, so unless you can remember thousands and thousands of definitions, you have to provide them in the spreadsheet somehow. Right now I have 12-15 columns of data. If I added new columns alongside what I already have for the purpose of definitions, that's at least 25 columns total, which I cannot possibly view on one (or even two or three) screens at one time. It would be great to instantly see the data by a mouseover, click, keyboard stroke sequence, or something similar. Any ideas? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP with mouseover?
Would adding the definitions as cell comments be acceptable?
Tim Sure, can this be done automatically? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP with mouseover?
I have accomplished it this way:
1) I insert a new command called "LookUpDefinition" with the user right-clicks the cell. 2) The definition appears in a message box. It requires a global variable to hold the cell being looked up because I found I had to call a macro not in the same code module as the worksheet, and could not pass it an argument either: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _ Cancel As Boolean) Dim obj As Object Set TheCell = Target For Each obj In Application.CommandBars("cell").Controls '''''''''''Tag helps you know what to delete later If obj.Tag = "HereIsYourItem" Then obj.Delete Next obj ''''''''''''I named the range you can rt-click to ''''''''''''trigger this DataElements If Not Application.Intersect(Target, Range("DataElements")) _ Is Nothing Then With Application.CommandBars("cell").Controls _ .Add(Type:=msoControlButton, befo=6, _ temporary:=True) .Caption = "See The Definition" '''''''''''I named the shortcut menu item this .OnAction = "HereIsYourMacro" ''''''''''''''''''this doesn't seen to be able to accept arguments ''''''''''' it would not call a subprocedure from within ''''''''''' the worksheet's code module '''''''''''''also doesn't seem to take arguments which is why I said ''''''''''''' you should set a global variable '''''''''''Tag helps you know what to delete later .Tag = "HereIsYourItem" End With End If End Sub '''In a separate module: Option Explicit Public TheCell As Range Sub HereIsYourMacro() MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)") End Sub "Cheese" wrote in message ... Is there any way to perform the equivalent of a VLOOKUP so that a simple mouseover (or click) of a cell displays the data in a pop-up like format? The mainframe data at my work abbreviates everything, so unless you can remember thousands and thousands of definitions, you have to provide them in the spreadsheet somehow. Right now I have 12-15 columns of data. If I added new columns alongside what I already have for the purpose of definitions, that's at least 25 columns total, which I cannot possibly view on one (or even two or three) screens at one time. It would be great to instantly see the data by a mouseover, click, keyboard stroke sequence, or something similar. Any ideas? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP with mouseover?
Here is the code without all the awful comments that seem to be wrapping
around:. Also, I lied, the caption was not "LookUpDefinition", it was "See The Definition" Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _ Cancel As Boolean) Dim obj As Object Set TheCell = Target For Each obj In Application.CommandBars("cell").Controls If obj.Tag = "HereIsYourItem" Then obj.Delete Next obj If Not Application.Intersect(Target, Range("DataElements")) _ Is Nothing Then With Application.CommandBars("cell").Controls _ .Add(Type:=msoControlButton, befo=6, _ temporary:=True) .Caption = "See The Definition" .OnAction = "HereIsYourMacro" .Tag = "HereIsYourItem" End With End If End Sub 'In the separate module: Option Explicit Public TheCell As Range Sub HereIsYourMacro() MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)") End Sub "William Benson" wrote in message ... I have accomplished it this way: 1) I insert a new command called "LookUpDefinition" with the user right-clicks the cell. 2) The definition appears in a message box. It requires a global variable to hold the cell being looked up because I found I had to call a macro not in the same code module as the worksheet, and could not pass it an argument either: Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, _ Cancel As Boolean) Dim obj As Object Set TheCell = Target For Each obj In Application.CommandBars("cell").Controls '''''''''''Tag helps you know what to delete later If obj.Tag = "HereIsYourItem" Then obj.Delete Next obj ''''''''''''I named the range you can rt-click to ''''''''''''trigger this DataElements If Not Application.Intersect(Target, Range("DataElements")) _ Is Nothing Then With Application.CommandBars("cell").Controls _ .Add(Type:=msoControlButton, befo=6, _ temporary:=True) .Caption = "See The Definition" '''''''''''I named the shortcut menu item this .OnAction = "HereIsYourMacro" ''''''''''''''''''this doesn't seen to be able to accept arguments ''''''''''' it would not call a subprocedure from within ''''''''''' the worksheet's code module '''''''''''''also doesn't seem to take arguments which is why I said ''''''''''''' you should set a global variable '''''''''''Tag helps you know what to delete later .Tag = "HereIsYourItem" End With End If End Sub '''In a separate module: Option Explicit Public TheCell As Range Sub HereIsYourMacro() MsgBox Evaluate("=VLOOKUP(""" & TheCell.Value & """,LookupRange,2)") End Sub "Cheese" wrote in message ... Is there any way to perform the equivalent of a VLOOKUP so that a simple mouseover (or click) of a cell displays the data in a pop-up like format? The mainframe data at my work abbreviates everything, so unless you can remember thousands and thousands of definitions, you have to provide them in the spreadsheet somehow. Right now I have 12-15 columns of data. If I added new columns alongside what I already have for the purpose of definitions, that's at least 25 columns total, which I cannot possibly view on one (or even two or three) screens at one time. It would be great to instantly see the data by a mouseover, click, keyboard stroke sequence, or something similar. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MouseOver | Excel Discussion (Misc queries) | |||
can I create a mouseover in excel | Excel Discussion (Misc queries) | |||
How to view data using a mouseover? | Excel Discussion (Misc queries) | |||
Cursor becomes a cross on mouseover? | New Users to Excel | |||
Image with mouseover text | Excel Programming |