# 24 - Course macros and Excel VBA - Restrict access to spreadsheets

Опубликовано: 21 Апрель 2026
на канале: Alessandro Trovato
47,719
1.9k

24 - Course macros and Excel VBA - Restrict access to spreadsheets

In the twenty-fourth lesson we will learn to block access to a worksheet of your workbook.
Using the ENVIRON statement will limit access to a spreadsheet parauma only person authorized or more.

Topics covered in class:

ENVIRON
Environment variables Operating System

 - Block access to a worksheet of your workbook and allow access only to authorized persons.
We will use the following features:
 - ENVIRON
 - UCASE (convert text to uppercase)
 - Application.ScreenUpdating
 - IF (for comparison)
 - VBA project protection with password

I hope you enjoy the content.
If you like to share with your co-workers and friends!

************************************************
complete course of Advanced Excel Online. Go!
http://curseduca.com/136-microsoft-ex...
************************************************

Access spreadsheets:
www.sigaonerd.com

OTHER COURSE CLASSES - Microsoft Excel

Lesson 1 - Introduction to Course and description of what is a macro
   • #01 - Macros Excel VBA - Aprenda a programar  

Lesson 2 - First macro: configure automatically page
   • #02 - Macros e Excel VBA - Aprenda a progr...  

Class 3 - Types of macros: Relative or Absolute
   • #03 - Curso de Macros e Excel VBA - Referê...  

Lesson 4 - Associating macros buttons
   • #04 - Curso de Macros e Excel VBA - Botões...  

Lesson 5 - Macro Security
   • #05 - Curso de Macros e Excel VBA - Segurança  

Lesson 6 - Registration Client - Model 1
   • #06 - Macros e Excel VBA - Curso Grátis e ...  

Lesson 7 - Registration Client - Version 2
   • #07 - Macros e Excel VBA - Cadastro de Cli...  

Lesson 8 - Combo Box - Form Control
   • #08 - Macros e Excel VBA - Caixa de Combin...  

Lesson 9 - Checkbox and Radio Button - Form Control
   • #09 - Macros e Excel VBA - Caixa de Seleçã...  

Lesson 10 - List Box and Spin Button - Form Control
   • #10 - Macros e Excel VBA - Controle de For...  

L11 - Start of VBA programming activities
   • #11 - Macros e Excel VBA - Começando a pro...  

Lesson 12 - Events (Activate, Calculate), comment code, RANGE instruction and Verification Immediate
   • #12 - Macros e Excel VBA - Eventos e Instr...  

Lesson 13 - Variables in VBA
   • #13 - Macros e Excel VBA - Tipos e Uso de ...  

Lesson 14 - Variables in Visual Basic for Applications (continued)
   • #14 - Macros e VBA - Excel - Tipos de Vari...  

Class 15 - Repetition structure - DO WHILE ... LOOP
   • #15 - Macros e Excel VBA - Do While - Loop  

Lesson 16 - Repetition structure - DO WHILE ... LOOP (reverse)
   • #16 - Curso de Macros e Excel VBA - Do Whi...  

Lesson 17 - Repetition structure - DO UNTIL ... LOOP
   • #17 - Curso de Macros e Excel VBA - Do Unt...  

Lesson 18 - Repeat structure with criteria - IF Function
   • #18 - Curso de Macros e Excel VBA - IF The...  

Lesson 19 - Repetition structure - FOR NEXT
   • #19 - Curso de Macros e Excel VBA - For Next  

Lesson 20 - Repetition structure - FOR NEXT STEP ...
   • #20 - Curso de Macros e Excel VBA - For Ne...  

Lesson 21 - Repetition structure - FOR EACH ... NEXT
   • #21 - Curso de Macros e Excel VBA - For ea...  

Lesson 22 - Repetition structure - FOR EACH ... NEXT - With the user password prompt
   • #22 - Curso de Macros e Excel VBA - Estrut...  

Lesson 23 - Registering opening and closing sheet (using the Environ statement)
   • #23 - Curso de Macros e Excel VBA - Enviro...  

Youtube channel confirmation link
   / @alessandrotrovato  

Follow us on Facebook or Twitter
  / sigaonerdpontocom  
  / aletrovato  

Excel is a Microsoft Office program