Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
  • Avatar do usuário
#25423
Bom dia!!


Consegue adaptar esse exemplo?
Código: Selecionar todos
Public Executar As Double
'Adicione esse código em um Módulo
Sub IniciarPiscagem()
    If Range("A1").Interior.ColorIndex = 3 Then
        Range("A1").Interior.ColorIndex = 6
    Else
        Range("A1").Interior.ColorIndex = 3
    End If
    Executar = Now + TimeSerial(0, 0, 1)
    Application.OnTime Executar, "IniciarPiscagem", , True
End Sub

Sub PararPiscagem()
    Range("A1").Interior.ColorIndex = xlAutomatic
    Application.OnTime Executar, "IniciarPiscagem", , False
End Sub
Código: Selecionar todos
Public VerificarCelula As Boolean
 
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
     
     'Adicione esse código dentro do Módulo de Plan1 (dentro do Editor VBA)
    If Range("A1") = "1" And VerificarCelula = False Then
        Call IniciarPiscagem
        VerificarCelula = True
    ElseIf Range("A1") <> "1" And VerificarCelula = True Then
        Call PararPiscagem
        VerificarCelula = False
    End If
     
End Sub
Att
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord