lundi 30 janvier 2017

VBA IF statement with Form Control (CheckBox)

I'm trying to create a check box using form control (not ActiveX) to make the formula bar appear/disappear. The problem is that when I check the button, the formula bar disappears - but when I uncheck the button, nothing happens (i.e. the formula bar doesn't appear again). Here's the code I have:

Sub FormulaBar2()

    If ActiveSheet.Shapes("CheckBox5").ControlFormat.Value = True Then
        Application.DisplayFormulaBar = True
    Else
        Application.DisplayFormulaBar = False
    End If

End Sub




Aucun commentaire:

Enregistrer un commentaire