Escola Saberexcel VBA Estudos - Treinamento com Macros, Fórmulas e Funções
 Esses macros do Aplicativo Microsoft Excel VBA(Visual Basic Application), ocultam ou mostram os shapes, observe que nesta coleção de Shapes(Autoformas) imagens usei um temporizador para pausar o giro da instrução Loop For ...Next. Espero que gostem do Exemplo. fiquem com Deus, Expedito Marcondes
 ' - - - - - - - - - - - - - - - -' Sub sbx_oculta_Shapes() sbx_smile_20_f
For i = 1 To 20 On Error Resume Next With ActiveSheet .Shapes("saber" & i).Visible = False End With Next i
[A1].Select End Sub ' - - - - - - - - - - - - - - - -' Sub sbx_mostrar_shapes() sbx_oculta_Shapes For i = 1 To 20 On Error Resume Next
With ActiveSheet .Shapes("saber" & i).Visible = True End With Tempo 0.5 Next i
sbx_oculta_Shapes sbx_smile_20_t [A1].Select End Sub ' - - - - - - - - - - - - - - - -'
Sub Tempo(SbTempo) Dim VelhoTempo As Variant If SbTempo < 0.01 Or SbTempo > 300 Then SbTempo = 1
VelhoTempo = Timer Do DoEvents Loop Until Timer - VelhoTempo >= SbTempo End Sub ' - - - - - - - - - - - - - - - -' Sub sbx_smile_20_t() Saber1.Shapes("saberexcel").Visible = True End Sub ' - - - - - - - - - - - - - - - -' Sub sbx_smile_20_f() Saber1.Shapes("saberexcel").Visible = False End Sub ' - - - - - - - - - - - - - - - -'
'observe que aqui criamos um objeto wordPad para mostrar o macro na tela ou diretamente no VBE(Visual Basic Editor) Sub sbx_visualizar_macro() Dim Resposta As String Resposta = MsgBox("deseja visualizar(tela ou vbe)?" & vbCrLf & " se SIM = Tela" & vbCrLf & " se NAO = VBE", vbYesNo, "Saberexcel - o site das macros") If Resposta = 6 Then ActiveSheet.Shapes.Range(Array("macro")).Select Selection.Verb Verb:=xlPrimary Else Application.Goto reference:="sbx_oculta_Shapes" End If End Sub
' - - - - - - - - - - - - - - - -'
 Aprenda tudo sobre planilhas do Aplicativo Microsoft Excel VBA(Visual Basic Application), sozinho, com baixo custo, praticando com os produtos didáticos Escola Saberexcel VBA Estudos® - Treinamentos com Macros, Fórmulas e Funções.

|