VBA code already there in brand new file

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I closed all excel files. I opened a new one by clicking on excel icon. I go to VBA editor and I see some codes there? Why and from where they came? Thank you very much.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Perhaps you have add-ins and/or a Personal.xlsb workbook that contains macros.
 
Upvote 0
Upvote 0
Or may be it's just Option Explicit code line there.
If so then you can ignore that as it does not saved with XLSX, such a behavior can be disabled in VBE - Tools - Options - Editor - Require Variable Declaration, but it is useful for coding.
 
Upvote 0
Thank you all. I appreciate the help

Or when you open the VBE, is the Funcres file showing codes.

Or when you open the VBE, is the Funcres file showing codes.
Or may be it's just Option Explicit code line there.
If so then you can ignore that as it does not saved with XLSX, such a behavior can be disabled in VBE - Tools - Options - Editor - Require Variable Declaration, but it is useful for coding.
Is the code actually in the workbook that is automatically opened when you open Excel, or as JoeMo has suggested?

If the code is in the standard workbook that is opened with Excel, then perhaps you have a workbook with VBA code in your Excel 'Startup folder'. See Customize how Excel starts
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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