Академический Документы
Профессиональный Документы
Культура Документы
Application.EnableCancelKey =
Application.EnableCancelKey
xlDisabled
Application.ScreenUpdating =
Application.ScreenUpdating Teste41
False
ActiveSheet.Calculate
or
Calculate Sheets("Plan1").Calculate Teste42
or
Range("A1:A20").Calculate
ActiveWindow.Caption =
Caption Teste21
"Cavalcante Consultores"
Cos x = Cos(0)
Application.DataEntryMode =
DataEntryMode Teste44
xlOn
Do Until x = 10
Do, Until, Loop "Execute as seguintes intruções"
Loop
Do While x < 10
Do, While, Loop "Execute as seguintes intruções"
Loop
Relação de Comandos VBA 3
If Condição Then
"Execute as seguintes instruções"
Else
Else Teste20
"Caso a condição acima não seja
atendida, execute o seguinte:"
End If
If Condição Then
"Execute as seguintes instruções"
ElseIf Condição Then
"Execute as seguintes instruções"
ElseIf Else Teste49
"Caso as condições acima não
sejam atendidas, execute o
seguinte:"
End If
Eventos Planilha
For x = 1 To 10
ActiveCell.Offset(0, 0) =
For, Next "Cavalcante Consultores" Teste22
ActiveCell.Offset(1, 0).Select
Next
If Condição Then
If "Execute as seguintes instruções" Teste49
End If
Variavel = UCase("Cavalcante
UCase Teste27
Consultores")
Variavel = Len("Cavalcante
Len Teste51
Consultores")
If Condição = "Cavalcant" Or
Condição = "Treinamentos" Then
Or Teste54
"Execute as seguintes instruções"
End If
Selection.Font.Name = "Times
Selection.Font.Name Teste56
New Roman"
Set Objeto =
Set Worksheets("Exemplo").Range("A
1")
Application.WindowState =
WindowState Teste11
xlMaximized
Ctrl + R
F4
Alt + F11
ActiveCell Variavel = ActiveCell Teste37
Relação de Comandos VBA 6
ActiveWindow
Application.Run Application.Run("Macro1")
Sub Sub Macro1
Sheets
Range Range("A1:H15").Select Teste42
Selection.Copy
Selection.End(xlToRight).Select
Selection.End(xlToUp).Select
Selection.End(xlToDown).Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(0,0).select
Selection.NumberFormat =
"#,##0.00"
ActiveCell.FormulaR1C1 =
TODAY() Teste46
"=TODAY()"
Selection.Copy
Sheets("Plan1").Select
Range("A5").Select
Variavel = InputBox("Qual o
seu Nome?")
ActiveCell.FormulaR1C1 =
CDate(Data)
Else
End If
Variavel = ActiveCell.Offset(0, 2)
& Teste36
Call Macro1
ClearContents Selection.ClearContents
CurrentRegion.Select
Selection.CurrentRegion.Select
Selection.Sort
Sort Key1:=Range("A1"),
Order1:=xlAscending
Variavel =
Left Teste28
Left("Cavalcante", 5)
Relação de Comandos VBA 8
Variavel =
Right Teste29
Right("Cavalcante", 5)
Variavel =
Mid Teste30
Mid("Cavalcante", 6, 3)
Selection.Insert
Insert Teste31
Shift:=xlDown
Exit Function
Next
Tamanho =
Len Teste2
Len("Cavalcante")
CommandBars("Standard").Visib
Application.CommandBars("Stand Teste6
le = True
ard").Visible = True
Application.ScreenUpdating =
ScreenUpdating
False
Variavel = StrConv("Cavalcante
StrConv Teste7
Consultores", 3)
AutoFilter Selection.AutoFilter
Selection.AutoFilter Field:=1,
Field:
Criteria1:="1"
ShowAllData ActiveSheet.ShowAllData
Application.Wait (Now +
Wait Teste35
TimeValue("0:00:30"))
Senha Teste57
Consistir Formulario (valmir
Abril)
Form Teste60
Descrição
armazena-se na variavel o resultado da função, que
neste exemplo retorna o valor absoluto do numero. No
exemplo ao lado, retorna o numero 20
Ativa a planilha "Plan2".