Excel 2016 macro works fine, but causes the first sheet to freeze in Excel 2013.

jellii

New Member
Joined
Mar 17, 2017
Messages
1
I have a series of subs that I have done in Excel 2016. The macro works as follows:

Open UserForm.
Select dates, select users, and another two options.
Run a SQL query, place imported data on a worksheet that gets created.
Depending on the options chosen, at least one worksheet will be created for each user.
Perform various basic calculations for each user on their own sheet.
Do basic formatting - center text, header row style, etc.

Logically it's really a fairly simple program.

Users at my company with Excel 2016 have zero issues with the macro (hence why I didn't even know there was an issue for a couple of months). However, when users with Excel 2013 run the macro it appears to work correctly, with the problem being that the first worksheet will not scroll. In addition, if you click on View -> Freeze Panes it will cause Excel to crash. There is nothing concerning freezing panes anywhere in my code.

The problem seems to be fixed when the user clicks into a different worksheet and then returns to the first sheet. The worksheets that are not active when the macro completes running seem to be perfectly normal.

Does anybody know why this is happening? I've tried putting lines of code in to select one sheet and then select the first one, to no avail. I tried a line of code that turns Freeze Panes off, but that also did not work.

Please help,

Confused in Wausau.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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