Help with a macro please

Buns1976

Board Regular
Joined
Feb 11, 2019
Messages
194
Office Version
  1. 365
Platform
  1. Windows
Hi Everyone,

I'm having an issue on occasion where macros that are written in the vba editor are not showing up
in the macro ribbon so I can assign it to a button? Whats strange to me is the exact same macro
will show just fine in a different workbook? It is a macro enabled workbook and I have a couple of
other macros that show in the ribbon and run just fine?

Thanks!

Code:
Sub Workbook_BeforeClose(Cancel As Boolean) 
     ActiveWorkbook.SaveAs FileName:="C:\OFFICEELITE\PLU.XLSM"
     ActiveWorkbook.Close
     Application.Quit


End Sub
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Any procedure that requires arguments, will not show in the list of available macros as you need to pass the argument in order to run the code.

arguments are when you have something in the brackets after the macro name
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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