Simple vba question.

vbacoder12

New Member
Joined
Sep 4, 2024
Messages
41
Office Version
  1. 2024
  2. Prefer Not To Say
Platform
  1. Windows
I have an option explicit sub which is running a series of subs one of my last subs is to freeze panes. Some times it freezes the correct amount of panes some times not. Also if I run this outside of the option explicit sub it works fine here is the vba

Sub freezerow
'
' freezerow macro
'
'
With ActiveWindow
.splitcolumn=3
.splitrow=6
End With
ActiveWindow.Freezepanes=TRUE
End Sub
 
Sorry I didn't even know anything about my profile.
You can amend it by clicking where your username and profile pic is at the top of the page and then click "Account details". Remember to save it before exiting.

between application.goto reference:=activesheet.range ("a1"),scroll:true
That a single line and so I don't know exactly where you are putting the code and why you need to use it on top of the
Rich (BB code):
    Application.Goto Reference:=ActiveSheet.Range("D7")
    With ActiveWindow
        If .FreezePanes = True Then .FreezePanes = False
            .FreezePanes = True
    End With
that Alex posted.
Unless you specifically need split windows over Freeze panes (they are different) that you asked for in post one can you please post your current code (and state what issue you had with Alex's code).

I have another question about another code that isn't working way is thought should I create a new post
If it is related to splitting windows or freezing panes then you can post it here, if it is not related then you should start a new post
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,226,107
Messages
6,188,968
Members
453,515
Latest member
maccannix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top