Forum Discussion

staspe2475's avatar
staspe2475
Copper Contributor
Sep 13, 2024
Solved

Mouse hover in cell to display text LARGER code is very slow

The following code works fine on a small Range.. But when i expand the Range for the whole worksheet..it  runs very very  slow   Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim x...
  • JKPieterse's avatar
    Sep 13, 2024

    staspe2475 Try if this fits your needs:

    Option Explicit
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        With Range("B4:BI84").Validation
            .Delete
        End With
        With Target.Validation
            .Delete
            .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, _
                 Operator:=xlBetween
            .IgnoreBlank = True
            .InCellDropdown = True
            .InputMessage = Target.Value    ''"First Name of Sales Rep"
            .ShowError = True
        End With
    End Sub
    

Resources