VBA code already there in brand new file

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,565
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.
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
16,831
Office Version
2010
Platform
Windows
Perhaps you have add-ins and/or a Personal.xlsb workbook that contains macros.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
44,611
Office Version
365
Platform
Windows

ZVI

MrExcel MVP
Joined
Apr 9, 2008
Messages
3,658
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.
 

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
5,545
Office Version
2019
Platform
Windows
Or when you open the VBE, is the Funcres file showing codes.
 

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,565
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
 

Watch MrExcel Video

Forum statistics

Threads
1,098,859
Messages
5,465,111
Members
406,412
Latest member
superjoejoe

This Week's Hot Topics

Top