VBA Memory/Macro Problems

bfarms

New Member
Joined
Nov 15, 2012
Messages
11
I have been successfully using a macro that I learned here a few years ago but it stopped working. It doesn't show up in Macros anymore and I can't open the editor by using Alt+F11. When I try, it says out of memory.
Now, this is affecting every Excel workbook I am in--which do not have their own Macros. An error pops up in the other workbooks that says Can't find project or library (Visual Basic for Applications) after I hit okay, a dialog box called "References-VBA Project" pops up.

This is my macro: (to print a page # on each sheet)

Sub PgNumbs()
For i = 1 To 50
With Sheets("WorkOrders")
.PageSetup.RightHeader = "Page " & i
.PageSetup.FitToPagesWide = 1
.PageSetup.FitToPagesTall = 1
.PrintOut Copies:=1
End With
Next
end sub

<tbody>
</tbody>


Anyone have any ideas to help? I am not a proficient Macro user but was so happy to learn from everyone here and help out with a weekly chore by way of a macro. Thanks !
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,221,525
Messages
6,160,329
Members
451,637
Latest member
hvp2262

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