Forum Discussion

Jb Jeannot's avatar
Jb Jeannot
Copper Contributor
Feb 20, 2018
Solved

VBA Update different of UpdateAll from Excel

Hello ! I'm working on a personnal VBA code, and when I use this :    The result on my Excel isn't the same as my code on VBA when I debug. What is surprising is the fact that on an othe...
  • JKPieterse's avatar
    JKPieterse
    Feb 22, 2018

    What about this method then:

    Sub RefreshUsingCommandbarbutton()
        Dim oCMB As CommandBar
        'Add temporary commandbar
        Set oCMB = Application.CommandBars.Add("MyBar", msoBarPopup, False, True)
        'Add refreshall button and click it
        With oCMB.Controls.Add(ID:=1952)
            .Execute
        End With
        'Remove temporary commandbar
        Application.CommandBars("MyBar").Delete
        Set oCMB = Nothing
    End Sub

Resources