Show in a cell that the current workbook has macros or macro enabled

bamaisgreat

Well-known Member
Joined
Jan 23, 2012
Messages
831
Office Version
  1. 365
Platform
  1. Windows
Not sure if this could be formula or vba.

Is it possible to show in cell A20 if the workbook is a xls or xlsm?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
How about
=LEFT(REPLACE(CELL("filename"),1,FIND(".xl",CELL("filename")),""),4)
 
Upvote 0
Or if you are likely to use it on an old file try
=SUBSTITUTE(LEFT(REPLACE(CELL("filename"),1,FIND(".xl",CELL("filename")),""),4),"]","")
 
Upvote 0
If its an xls can it show in the cell xls (Contains Macros) or if its say a xlsm (Macros Enabled)
 
Upvote 0
If its an xls can it show in the cell xls (Contains Macros) or if its say a xlsm (Macros Enabled)
Are you saying the the "xls" files always will contain macros (so you want it to ALWAYS return "xls (Contains Macros)", or are you asking if it is an xls, if there is a way to determine whether or not the xls contains any macros?

 
Upvote 0
If there is away for it to show if it contains macros.
We use a lot of workbooks that contain macros and Im trying to figure out a way to flag a certain excel user that the workbook contains macros and that he needs to convert before trying to email.
 
Upvote 0
To do that using VBA, you would have to ensure that every user has set the security to "Trust access to the VBA project object model", which is something I would not recommend.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,654
Latest member
mememe101

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