- Este tópico contém 0 respostas, 1 utilizador e foi actualizado pela última vez há 13 anos, 3 meses por Anónimo.
-
AutorArtigos
-
-
5 de Agosto de 2011 às 10:44 #977AnónimoInactivo
tentei essa programação abaixo para realizar a formatação condicional por vba, porém não funciona. alguém, por gentileza, poderia me ajudar?
grande abraço!
sub formataÇÃo_condicional_1()
range(“b12:p200”).select
cells.formatconditions.delete
range(“e5:f5,j5:k5,m5,o5:p5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlcellvalue, operator:=xlequal, _
formula1:=”=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.color = -3026479
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“h5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlexpression, formula1:=”=$g$5=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.themecolor = xlthemecolordark1
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“i5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlexpression, formula1:=”=$g$5=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.themecolor = xlthemecolordark1
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“b12:p200″).select
selection.formatconditions.add type:=xlcellvalue, operator:=xlequal, _
formula1:=”=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.color = -3026479
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
activewindow.smallscroll down:=-21
range(“o1:p1”).select
end sub_____________________________________________________________________________
sub formataÇÃo_condicional_2()
range(“b12:p200”).select
cells.formatconditions.delete
range(“e5:f5,j5:k5,m5,o5:p5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlcellvalue, operator:=xlequal, _
formula1:=”=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.color = -3026479
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“h5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlexpression, formula1:=”=$g$5=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.themecolor = xlthemecolordark1
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“i5”).select
range(“b12″).activate
selection.formatconditions.add type:=xlexpression, formula1:=”=$g$5=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.themecolor = xlthemecolordark1
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“b12:p200″).select
selection.formatconditions.add type:=xlcellvalue, operator:=xlequal, _
formula1:=”=0”
selection.formatconditions(selection.formatconditions.count).setfirstpriority
with selection.formatconditions(1).font
.themecolor = xlthemecolordark1
.tintandshade = 0
end with
selection.formatconditions(1).stopiftrue = false
range(“o1:p1”).select
end sub
-
-
AutorArtigos
- Tem de iniciar sessão para responder a este tópico.