Views

...

Important:

Quaisquer soluções e/ou desenvolvimento de aplicações pessoais, ou da empresa, que não constem neste Blog podem ser tratados como consultoria freelance.

E-mails

Deixe seu e-mail para receber atualizações...

eBook Promo

Mostrando postagens com marcador Login. Mostrar todas as postagens
Mostrando postagens com marcador Login. Mostrar todas as postagens

Truques VBA Raramente Usados - Protect Workbook

Truques VBA Raramente Usados - Protect Workbook




Em muitas ocasiões desejaremos manter nossas planilhas protegidas após inserções, atualizações ou mesmo troca de versão. O que segue abaixo é o modo de mantê-las protegidas entre estes momentos.

Sub PWorkbook()
Dim pwd1 As String, ShtName As String
pwd1 = InputBox("Please Enter the password")
If pwd1 = "" Then Exit Sub
ShtName = "Workbook as a whole"
ActiveWorkbook.Protect Structure:=True, Windows:=False, Password:=pwd1
MsgBox "The workbook's structure has been protected."
Exit Sub
ErrorOccured:
MsgBox "Workbook could not be Protected"
Exit Sub
End Sub
On Error GoTo ErrorOccured

Sub UnPWorkbook()
On Error GoTo ErrorOccured
Dim pwd1 As String, ShtName As String
pwd1 = InputBox("Please Enter the password")
If pwd1 = "" Then Exit Sub
ShtName = "Workbook as a whole"
ActiveWorkbook.Unprotect Password:=pwd1
MsgBox "The workbook's structure has been Unprotected."
Exit Sub
ErrorOccured:
MsgBox "Workbook could not be UnProtected - Password Incorrect"
Exit Sub     
End Sub



brazilsalesforceeffectiveness@gmail.com

✔ Brazil SFE®Author´s Profile  Google+   Author´s Professional Profile   Pinterest   Author´s Tweets

Truques VBA Raramente Usados - Como Logar-se em sites HTTPS Usando VBA Excel

Truques VBA Raramente Usados - Como Logar-se em sites HTTPS Usando VBA Excel


Atualize seu código que precisa logar-se em páginas HTTPS.

Automatize a conexão nos sites que precisa informar login e senha.

     Set ie = CreateObject("InternetExplorer.Application.1")
            ie.Visible = True
            ie.navigate cURL
              
             Application.Wait (Now + TimeValue("0:00:10"))
            If ie.readyState = READYSTATE_LOADING Then
          
              Set objShellWindows = New ShellWindows

            Application.SendKeys "abcd"
            Application.SendKeys "{TAB}"
            Application.SendKeys "pwd123"
            Application.SendKeys "{TAB}"
            Application.SendKeys "{RETURN}"
           
            End If
             
        'Do While ie.Busy: DoEvents: Loop

          Set doc = ie.Document

brazilsalesforceeffectiveness@gmail.com

✔ Brazil SFE®Author´s Profile  Google+   Author´s Professional Profile   Pinterest   Author´s Tweets

eBooks VBA na AMAZOM.com.br

LinkWithinBrazilVBAExcelSpecialist

Related Posts Plugin for WordPress, Blogger...

Vitrine