1
I have a registration form that shows up as soon as we open the spreadsheet. The registration list (in the Sheets) is invisible and can be accessed only by password by clicking on the "Database" button. However, when a person will access it for the first time on his machine, appears the Excel warning to enable macros, and the contents of the spreadsheet (in Sheets) ends up being exposed to the user. I would like only a warning sheet to appear, in order to open the form only if it enables the macros first. I already created it with the guidelines and I left it in Veryhidden, but I wanted to know what would be the code to put in Thisworkbook. I think it would be in Workbook_beforeclose.
Someone would know to help?
Hello colleague, welcome to the SOPT. This site is not a forum. If not done yet, do the [tour], but mainly do not miss read [Ask]. Your question is not entirely clear. It seems that you say that the form is displayed even if the user does not enable macros (which I find unlikely, since without macros enabled the form code does not perform). About exposing contents of spreadsheets (Sheets), isn’t it just a matter of putting password in Excel file? Finally, explain your problem better, illustrate with some image and, if possible, prepare a [mcve] to help understanding.
– Luiz Vieira
Thanks for the return Luiz. I wish I could put pictures, but I still don’t have that permission. What I mean is that when the user opens the file, the content is exposed until it enables macros. I don’t want this to happen. That’s why I created a warning sheet and I want only it to be exposed, while the ones that contain the data are hidden, when he opens the spreadsheet for the first time. There is a way to do this by code. This link ( is in English) explains my situation. http://www.cpearson.com/excel/EnableMacros.aspx. I’m trying to adapt to my reality
– Granado
Not at all, Granado. Well, even then you could have edited the question to make some points clearer, even put the link you are trying to play.
– Luiz Vieira