Notifications
Clear all

Habilitar ou nao o botao da macro

3 Posts
2 Usuários
0 Reactions
460 Visualizações
(@fazerbem)
Posts: 0
New Member
Topic starter
 

Tenho 3 botoes MACRO de envio de email

botao 1 - Solicita frete ao fabricante
botao 2 - Envia a loja o valor de frete
botao 3 - Envia o pedido ao fabricante aprovado pelo lojista

tenho as celulas

A1 - que se preenchida me dara acesso a habilitar o Botao 1

A2 - que se preenchida me dara acesso a habilitar o botao 2

a3- que se preenchida me dara acesso a habilitar o botao 3

Eu usaria para isso uma macro Geral e nela poria

Run "Botao 1" , ou Botao 2 ou botao 3 , seriam 3 If Else , podem me ajudar nessa ?

Grato

Andre

 
Postado : 05/01/2016 4:25 pm
(@mprudencio)
Posts: 0
New Member
 

Ve se isso ajuda colocando o codigo na folha da planilha


Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A1").Value <> "SIM" Then
BOTAO01.Enabled = False
Else
BOTAO01.Enabled = True
End If

If Range("A2").Value <> "SIM" Then
BOTAO02.Enabled = False
Else
BOTAO02.Enabled = True
End If

If Range("A3").Value <> "SIM" Then
BOTAO03.Enabled = False
Else
BOTAO03.Enabled = True
End If

End Sub

 
Postado : 05/01/2016 4:34 pm
(@fazerbem)
Posts: 0
New Member
Topic starter
 

Ola MPrudencio, so posso testar amanha, entao te falo, mas certo que ira funcionar.

Grato

Andre

 
Postado : 05/01/2016 5:04 pm