Sub Macro1() MsgBox "Olá, mundo!" End Sub
Sub Macro2() Range("A1").Value = Now() End Sub
Sub Macro3() If Range("A1").Value > 10 Then Range("A1").Interior.ColorIndex = 4 End If End Sub
Sub Macro4() Sheets("Planilha1").Range("A1:D10").Copy _ Destination:=Sheets("Planilha2").Range("A1") End Sub
Sub Macro5() Dim soma As Double soma = Application.WorksheetFunction.Sum(Range("A1:A10")) MsgBox "A soma é " & soma End Sub