Selecting non-Macro enabled files

mharchitect

New Member
Joined
Mar 18, 2019
Messages
11
When selecting xlsx files, the VBA project viewer is automatically launched. Can we prevent this knowing that I have one xlsm file in the same folder?

Thanks
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
11,311
Office Version
2013
Platform
Windows
How are you selecting the .xlsx files? By project viewer, it assumed you mean the vb editor window. I am unfamiliar with any process that automatically opens that window when selecting a file, execpt that a workbook would have a Workbook_Open macro that runs and calls the editor.
 
Last edited:

mharchitect

New Member
Joined
Mar 18, 2019
Messages
11
Select the xlsx files in the windows explorer (Win10). The VBA window (view code) is automatically opened.
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
11,311
Office Version
2013
Platform
Windows
Select the xlsx files in the windows explorer (Win10). The VBA window (view code) is automatically opened.
I assume you are then selecting the files manually.
I cannot get the same result. Do you get the vb editor screen when you just select the file, or is it when you open the file? If it is when you select the file, I have no idea what would cause the editor to open. But if it is when you open the selected file that you get the screen displayed then it could be that the file contains a Workbook_Open macro that is causing the condition. To check that, select and open a file and when the editor screen appears, double click on 'ThisWorkbook' in the small 'Project' pane at upper left of the editor screen. That should display any code that is in the ThisWorkbook code module and you can then copy and paste that in this thread so that we can see it and advise you.
 
Last edited:

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
11,311
Office Version
2013
Platform
Windows
Also, to be sure we are talking the same subject, I am referring to the code editor screen that appears when you press Alt + F11 from the Excel screen. If you are not referring to that screen as the 'View Code' screen, then we need to get that worked out soe we are talking the same object.
 

mharchitect

New Member
Joined
Mar 18, 2019
Messages
11
Yes when only selecting the file (xlsx) from the explorer (without opening), the VBA editor is opened (the same if you press Alt + F11). An xlsm file is already open before (if no xlsm file is open, the VBA editor is not popping up when selecting an xlsx file).
I tried this on 2 different PCs, the same behavior is showing.
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
11,311
Office Version
2013
Platform
Windows
Then you have some code in the already open file that is activating the vb editor screen. They don't just pop up on their own when a file is selected from the File Exporer page. You need to get someone locally who has some coding experience to help you look for the problem.
 

Forum statistics

Threads
1,082,601
Messages
5,366,571
Members
400,902
Latest member
fathima

Some videos you may like

This Week's Hot Topics

Top