Forum Discussion

rodsan724's avatar
rodsan724
Brass Contributor
Oct 21, 2021

Is possible to keep view with split because after my macros run it moves the columns around

Is it possible to realign where my columns are after my macro runs? Because after my macro runs it moves columns all around when it's done so it doesn't keep the same view.

 

 

1 Reply

  • rodsan724's avatar
    rodsan724
    Brass Contributor

    I figured it out with code similar to below

     

    Sub ResetView()
        Range("A2").Select
        ActiveWindow.ScrollColumn = 7
    
        ActiveWindow.Panes(2).Activate
        ActiveWindow.SmallScroll ToRight:=11
    End Sub

     

Resources