jpl458
jpl458

Reputation: 615

Delete macro that was saved wrong

I am learning EXCEL vba and was trying to create a macro that ran when EXCEL was opened. It was saved as "Personal Workbook" and now every EXCEL spreadsheet I open has this macro. Should have selected as "This Workbook". How do I get rid of that macro so that Workbooks open without it.

Thanks

Upvotes: 0

Views: 1099

Answers (3)

Ty Lamb
Ty Lamb

Reputation: 11

Using the gui to get to the file.

In Excel

File -> Options

Click on "Customize Ribbon"

In the right hand pain there is a "Developer" checkbox that is unchecked by default, check it.

Now go to the "Developer" ribbon and click "Macros"

Click the macro you do not want an click "Delete".

Upvotes: 0

Darren Bartrup-Cook
Darren Bartrup-Cook

Reputation: 19837

If you just want to remove the module in Personal workbook that was created, rather than the whole file:

  • In the Visual Basic Editor (Alt + F11 to open)
  • Find the PERSONAL.XLSB VBA Project in the Project Explorer (Ctrl + R to open in the VBE)
  • Press the little + sign next to VBAProject.
  • Press the little + sign next to the Modules folder in the project.
  • Find the module containing the code, right-click the module and select Remove ModuleName

Upvotes: 0

Cullen
Cullen

Reputation: 54

The personal workbook will be in Appdata/Microsoft/Excel/XLSTART. Just remove it from there. To get to your app data folder press windows+r and type %appdata%

Upvotes: 1

Related Questions