I have a friend that gave me some pseudo code so I could start figuring out how to code. Its like driving a car for the first time and need help organizing.
Basically, I need a macro that will read the first row cell texts and return a specific tooltip. For example, the macro will read "AA" and return "tooltip for AA" text. I need to run the macro to read the values because the placement of what is being read isn't always in the same column.
if anyone has a macro version using comment feature, that works, too. I think I saw a video somewhere that showed how to make your comment box pretty and h overable.
Here is what I have so far:
‘Select the range of headers, either automatically or manually before triggering the macro headerRange=Range([first cell],[last cell)
‘or
headerRange=Selection
‘iterate through each cell of the range
For Each headerCell in headerRange
‘read the value
headerValue=headerCell.Value
‘choose the tooltip
Select Case headerValue
Case “AA”
Tooltip=”Tooltip for AA”
Case “AB”
Tooltip=”tooltip for AB”
‘…more cases
Case Else ‘default
Tooltip=””
End Select
‘write the tooltip
With headerCell.Validation
.Delete
.Add Type:=xlValidateCustom
.InputMessage=tooltip
End With
Next headerCell
Bookmarks