Search code examples
vbaexcelactivex

Microsoft Slider control - Duplicate Image


Whenever I load an excel macro file with a MS Slider control, a duplicate image of the slider appears on the top left corner of the sheet. This duplicate copy of the slider disappears on scrolling the mouse or shifting between sheets.

How can I get rid of the duplicate slider?

enter image description here


Solution

  • This is just a workaround.

    Probably a bug on ScreenUpdate on these ActiveX objects. You can workaround by activating cells way below the Slider and then back to top when Workbook opens and the activesheet is where the slider resides.

    Below assuming the Slider is on Sheet1 and above row 50. Add code below to ThisWorkbook module.

    Option Explicit
    
    Private Sub Workbook_Open()
        With ThisWorkbook.ActiveSheet
            If .Name = "Sheet1" Then
                .Range("A100").Activate
                .Range("A1").Activate
            End If
        End With
    End Sub