ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   don't let the user disable macro's in Excel (https://www.excelbanter.com/excel-programming/294680-dont-let-user-disable-macros-excel.html)

Filip De Backer

don't let the user disable macro's in Excel
 
Hi

I've made an Excel workbook with a lot of protection in it

ActiveSheet.EnableSelection = xlUnlockedCells doens't work when I use this code in VBA (Access)
But when I use it in Excel, it works
How can I disable the selection of excel cells in VBA code that creates an Excel sheet

thanks a lo

Filip

Frank Kabel

don't let the user disable macro's in Excel
 
Hi
try
ActiveSheet.EnableSelection = 1

If you use this from Access the defined constant xlUnlockedCells is not
known


--
Regards
Frank Kabel
Frankfurt, Germany


Filip De Backer wrote:
Hi,

I've made an Excel workbook with a lot of protection in it.

ActiveSheet.EnableSelection = xlUnlockedCells doens't work when I use
this code in VBA (Access). But when I use it in Excel, it works.
How can I disable the selection of excel cells in VBA code that
creates an Excel sheet?

thanks a lot

Filip




All times are GMT +1. The time now is 02:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com