<hr style="color:#FFFFFF; background-color:#FFFFFF" size="1"> Picture the following scenario.
In cell A2 i have the following Text:
The quick brown fox jumps over the lazy dog
When I highlight a portion of this text I need a VBA Function to display the length in cell B2.
For instance.
I select A2: The quick brown fox
Cell B2 displays: 19
What i've got so far is this but have no clue how to use mouse events to capture just the selected portion of the text.
I'm guessing the use of Range("").select
Any and all help is appreciated
In cell A2 i have the following Text:
The quick brown fox jumps over the lazy dog
When I highlight a portion of this text I need a VBA Function to display the length in cell B2.
For instance.
I select A2: The quick brown fox
Cell B2 displays: 19
What i've got so far is this but have no clue how to use mouse events to capture just the selected portion of the text.
I'm guessing the use of Range("").select
Code:
Function GetLength(StrName As String)
GetLength = Len(StrName)
End Function