Ir ao conteúdo
  • Cadastre-se
Rafael Delevidove

Visual Basic Procedimento grande e nomes iguais. Como fugir dos dois problemas?

Recommended Posts

Pessoal. Eu vi tópicos distintos para dois problemas enfrentados. Porém nenhum explicando os dois na mesma situação.

 

Então. Estou criando uma planilha com muitas imagens e conectores. Daí estava usando worksheet_change para criar um código que "mudasse as imagens de lugar" (na verdade é ocultar uma e aparecer outra em outro lugar) e trocasse os conectores de acordo com certos botões clicados. A planilha em si estava ficando incrível. Mas ...

Apareceu uma mensagem "Procedimento muito grande". Daí eu vim aqui e vi um tópico em que a pessoa dava a solução de partir o procedimento em dois ou mais.

Porém quando o fiz, apareceu dizendo que "não pode nomes iguais". Novamente vim aqui e li num tópico que a solução era juntar e fazer tudo em um procedimento. Me fazendo voltar no primeiro problema. Alguém me da uma luz aí? O que posso fazer para não acontecer nenhum dos dois problemas?

 

Obrigado.

Compartilhar este post


Link para o post
Compartilhar em outros sites
Em 13/08/2018 às 02:01, Rafael Delevidove disse:

Pessoal. Eu vi tópicos distintos para dois problemas enfrentados. Porém nenhum explicando os dois na mesma situação.

 

Então. Estou criando uma planilha com muitas imagens e conectores. Daí estava usando worksheet_change para criar um código que "mudasse as imagens de lugar" (na verdade é ocultar uma e aparecer outra em outro lugar) e trocasse os conectores de acordo com certos botões clicados. A planilha em si estava ficando incrível. Mas ...

Apareceu uma mensagem "Procedimento muito grande". Daí eu vim aqui e vi um tópico em que a pessoa dava a solução de partir o procedimento em dois ou mais.

Porém quando o fiz, apareceu dizendo que "não pode nomes iguais". Novamente vim aqui e li num tópico que a solução era juntar e fazer tudo em um procedimento. Me fazendo voltar no primeiro problema. Alguém me da uma luz aí? O que posso fazer para não acontecer nenhum dos dois problemas?

 

Obrigado.

 

Você pode upar sua planilha para podermos lhe ajudar.

Compartilhar este post


Link para o post
Compartilhar em outros sites

O código é esse. Na verdade ta faltando algumas linhas de código pois tirei pra ela funcionar. 

 

Private Sub Worksheet_Change(ByVal Target As Range)

Dim cel As Integer

cel = Range("A1").Value 'Comando da Sala'

Select Case cel

Case 1 'Fechar'

ActiveSheet.Shapes("Picture 2").Visible = True
ActiveSheet.Shapes("Picture 2,1").Visible = False
ActiveSheet.Shapes("Picture 3").Visible = False
ActiveSheet.Shapes("Picture 3,1").Visible = True
ActiveSheet.Shapes("Picture 4").Visible = True
ActiveSheet.Shapes("Picture 4,1").Visible = False
ActiveSheet.Shapes("Picture 5").Visible = True
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 8").Visible = False
ActiveSheet.Shapes("Picture 8,2").Visible = False
ActiveSheet.Shapes("Picture 8,1").Visible = True
ActiveSheet.Shapes("Picture 29").Visible = True
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector angulado 48").Visible = False
ActiveSheet.Shapes("Conector angulado 44").Visible = True
ActiveSheet.Shapes("Conector reto 72").Visible = False
ActiveSheet.Shapes("Conector angulado 68").Visible = False
ActiveSheet.Shapes("Conector angulado 51").Visible = False
ActiveSheet.Shapes("Conector reto 64").Visible = True
ActiveSheet.Shapes("Conector angulado 57").Visible = True
ActiveSheet.Shapes("Conector angulado 52").Visible = True
ActiveSheet.Shapes("Conector reto 100").Visible = True
ActiveSheet.Shapes("Conector reto 98").Visible = True
ActiveSheet.Shapes("Conector angulado 99").Visible = True
ActiveSheet.Shapes("Conector angulado 97").Visible = True
ActiveSheet.Shapes("Conector reto 91").Visible = False
ActiveSheet.Shapes("Conector reto 96").Visible = False
ActiveSheet.Shapes("Conector angulado 93").Visible = False
ActiveSheet.Shapes("Conector angulado 88").Visible = False
ActiveSheet.Shapes("Conector angulado 122").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = True
ActiveSheet.Shapes("Conector reto 134").Visible = True
ActiveSheet.Shapes("Conector angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = True
ActiveSheet.Shapes("Conector angulado 142").Visible = True
ActiveSheet.Shapes("Conector angulado 149").Visible = True
ActiveSheet.Shapes("Conector angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = True
ActiveSheet.Shapes("Conector reto 159").Visible = False
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 160").Visible = True
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = True
ActiveSheet.Shapes("Conector reto 22").Visible = True
ActiveSheet.Shapes("Conector angulado 196").Visible = True
ActiveSheet.Shapes("Conector reto 195").Visible = True
ActiveSheet.Shapes("Conector reto 194").Visible = True
ActiveSheet.Shapes("Conector reto 192").Visible = True
ActiveSheet.Shapes("Conector reto 193").Visible = True
ActiveSheet.Shapes("Conector reto 191").Visible = True
ActiveSheet.Shapes("Conector reto 190").Visible = True
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 147").Visible = False
ActiveSheet.Shapes("Conector reto 148").Visible = False
ActiveSheet.Shapes("Conector reto 55").Visible = True
ActiveSheet.Shapes("Conector reto 61").Visible = True
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 2 'Abrir'

ActiveSheet.Shapes("Picture 2").Visible = False
ActiveSheet.Shapes("Picture 2,1").Visible = True
ActiveSheet.Shapes("Picture 3").Visible = True
ActiveSheet.Shapes("Picture 3,1").Visible = False
ActiveSheet.Shapes("Picture 4").Visible = True
ActiveSheet.Shapes("Picture 4,1").Visible = False
ActiveSheet.Shapes("Picture 5").Visible = True
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 8").Visible = False
ActiveSheet.Shapes("Picture 8,2").Visible = True
ActiveSheet.Shapes("Picture 8,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = True
ActiveSheet.Shapes("Conector angulado 48").Visible = True
ActiveSheet.Shapes("Conector angulado 44").Visible = False
ActiveSheet.Shapes("Conector reto 72").Visible = False
ActiveSheet.Shapes("Conector angulado 68").Visible = False
ActiveSheet.Shapes("Conector angulado 51").Visible = False
ActiveSheet.Shapes("Conector reto 64").Visible = True
ActiveSheet.Shapes("Conector angulado 57").Visible = True
ActiveSheet.Shapes("Conector angulado 52").Visible = True
ActiveSheet.Shapes("Conector reto 100").Visible = False
ActiveSheet.Shapes("Conector reto 98").Visible = False
ActiveSheet.Shapes("Conector angulado 99").Visible = False
ActiveSheet.Shapes("Conector angulado 97").Visible = False
ActiveSheet.Shapes("Conector reto 91").Visible = True
ActiveSheet.Shapes("Conector reto 96").Visible = True
ActiveSheet.Shapes("Conector angulado 93").Visible = True
ActiveSheet.Shapes("Conector angulado 88").Visible = True
ActiveSheet.Shapes("Conector angulado 122").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = True
ActiveSheet.Shapes("Conector reto 134").Visible = True
ActiveSheet.Shapes("Conector angulado 136").Visible = True
ActiveSheet.Shapes("Conector angulado 139").Visible = True
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = True
ActiveSheet.Shapes("Conector reto 160").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = True
ActiveSheet.Shapes("Conector reto 56").Visible = True
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 197").Visible = True
ActiveSheet.Shapes("Conector reto 175").Visible = True
ActiveSheet.Shapes("Conector reto 176").Visible = True
ActiveSheet.Shapes("Conector reto 179").Visible = True
ActiveSheet.Shapes("Conector reto 181").Visible = True
ActiveSheet.Shapes("Conector reto 200").Visible = True
ActiveSheet.Shapes("Conector reto 183").Visible = True
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 147").Visible = False
ActiveSheet.Shapes("Conector reto 148").Visible = False
ActiveSheet.Shapes("Conector reto 55").Visible = True
ActiveSheet.Shapes("Conector reto 61").Visible = True
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 3 'Automático'

ActiveSheet.Shapes("Picture 4").Visible = False
ActiveSheet.Shapes("Picture 4,1").Visible = True
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = True
ActiveSheet.Shapes("Picture 3").Visible = True
ActiveSheet.Shapes("Picture 3,1").Visible = False
ActiveSheet.Shapes("Picture 2").Visible = True
ActiveSheet.Shapes("Picture 2,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = True
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector angulado 48").Visible = False
ActiveSheet.Shapes("Conector angulado 44").Visible = True
ActiveSheet.Shapes("Conector reto 72").Visible = True
ActiveSheet.Shapes("Conector angulado 68").Visible = True
ActiveSheet.Shapes("Conector angulado 51").Visible = True
ActiveSheet.Shapes("Conector reto 64").Visible = False
ActiveSheet.Shapes("Conector angulado 57").Visible = False
ActiveSheet.Shapes("Conector angulado 52").Visible = False
ActiveSheet.Shapes("Conector reto 100").Visible = False
ActiveSheet.Shapes("Conector reto 98").Visible = False
ActiveSheet.Shapes("Conector angulado 99").Visible = False
ActiveSheet.Shapes("Conector angulado 97").Visible = False
ActiveSheet.Shapes("Conector reto 91").Visible = True
ActiveSheet.Shapes("Conector reto 96").Visible = True
ActiveSheet.Shapes("Conector angulado 93").Visible = True
ActiveSheet.Shapes("Conector angulado 88").Visible = True
ActiveSheet.Shapes("Conector angulado 122").Visible = True
ActiveSheet.Shapes("Conector angulado 129").Visible = False
ActiveSheet.Shapes("Conector reto 134").Visible = False
ActiveSheet.Shapes("Conector angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector angulado 153").Visible = True
ActiveSheet.Shapes("Conector angulado 154").Visible = True
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 160").Visible = True
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = True
ActiveSheet.Shapes("Conector reto 175").Visible = True
ActiveSheet.Shapes("Conector reto 176").Visible = True
ActiveSheet.Shapes("Conector reto 179").Visible = True
ActiveSheet.Shapes("Conector reto 181").Visible = True
ActiveSheet.Shapes("Conector reto 201").Visible = True
ActiveSheet.Shapes("Conector reto 183").Visible = True
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 4 'Manual'

ActiveSheet.Shapes("Picture 2").Visible = True
ActiveSheet.Shapes("Picture 2,1").Visible = False
ActiveSheet.Shapes("Picture 3").Visible = True
ActiveSheet.Shapes("Picture 3,1").Visible = False
ActiveSheet.Shapes("Picture 4").Visible = True
ActiveSheet.Shapes("Picture 4,1").Visible = False
ActiveSheet.Shapes("Picture 5").Visible = True
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = True
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector angulado 48").Visible = False
ActiveSheet.Shapes("Conector angulado 44").Visible = True
ActiveSheet.Shapes("Conector reto 72").Visible = False
ActiveSheet.Shapes("Conector angulado 68").Visible = False
ActiveSheet.Shapes("Conector angulado 51").Visible = False
ActiveSheet.Shapes("Conector reto 64").Visible = True
ActiveSheet.Shapes("Conector angulado 57").Visible = True
ActiveSheet.Shapes("Conector angulado 52").Visible = True
ActiveSheet.Shapes("Conector reto 100").Visible = False
ActiveSheet.Shapes("Conector reto 98").Visible = False
ActiveSheet.Shapes("Conector angulado 99").Visible = False
ActiveSheet.Shapes("Conector angulado 97").Visible = False
ActiveSheet.Shapes("Conector reto 91").Visible = True
ActiveSheet.Shapes("Conector reto 96").Visible = True
ActiveSheet.Shapes("Conector angulado 93").Visible = True
ActiveSheet.Shapes("Conector angulado 88").Visible = True
ActiveSheet.Shapes("Conector angulado 122").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = True
ActiveSheet.Shapes("Conector reto 134").Visible = True
ActiveSheet.Shapes("Conector angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector angulado 153").Visible = True
ActiveSheet.Shapes("Conector angulado 154").Visible = True
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 160").Visible = True
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = True
ActiveSheet.Shapes("Conector reto 175").Visible = True
ActiveSheet.Shapes("Conector reto 176").Visible = True
ActiveSheet.Shapes("Conector reto 179").Visible = True
ActiveSheet.Shapes("Conector reto 181").Visible = True
ActiveSheet.Shapes("Conector reto 201").Visible = True
ActiveSheet.Shapes("Conector reto 183").Visible = True
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 147").Visible = False
ActiveSheet.Shapes("Conector reto 148").Visible = False
ActiveSheet.Shapes("Conector reto 55").Visible = True
ActiveSheet.Shapes("Conector reto 61").Visible = True
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

End Select

cel = Range("B1").Value 'HCP'

Select Case cel

Case 1 'Automático HCP'

ActiveSheet.Shapes("Picture 39").Visible = True
ActiveSheet.Shapes("Picture 39,1").Visible = False
ActiveSheet.Shapes("Picture 39,2").Visible = False
ActiveSheet.Shapes("Picture 39,3").Visible = False
ActiveSheet.Shapes("Picture 39,4").Visible = False
ActiveSheet.Shapes("Picture 26").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 2 'Neutro HCP'

ActiveSheet.Shapes("Picture 39").Visible = False
ActiveSheet.Shapes("Picture 39,1").Visible = True
ActiveSheet.Shapes("Picture 39,2").Visible = False
ActiveSheet.Shapes("Picture 39,3").Visible = False
ActiveSheet.Shapes("Picture 39,4").Visible = False
ActiveSheet.Shapes("Picture 26").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 3 'Abrir HCP'

ActiveSheet.Shapes("Picture 39").Visible = False
ActiveSheet.Shapes("Picture 39,1").Visible = False
ActiveSheet.Shapes("Picture 39,2").Visible = True
ActiveSheet.Shapes("Picture 39,3").Visible = False
ActiveSheet.Shapes("Picture 39,4").Visible = False
ActiveSheet.Shapes("Picture 26").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 4 'Neutro HCP'

ActiveSheet.Shapes("Picture 39").Visible = False
ActiveSheet.Shapes("Picture 39,1").Visible = False
ActiveSheet.Shapes("Picture 39,2").Visible = False
ActiveSheet.Shapes("Picture 39,3").Visible = True
ActiveSheet.Shapes("Picture 39,4").Visible = False
ActiveSheet.Shapes("Picture 26").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 5 'Fechar HCP'

ActiveSheet.Shapes("Picture 39").Visible = False
ActiveSheet.Shapes("Picture 39,1").Visible = False
ActiveSheet.Shapes("Picture 39,2").Visible = False
ActiveSheet.Shapes("Picture 39,3").Visible = False
ActiveSheet.Shapes("Picture 39,4").Visible = True
ActiveSheet.Shapes("Picture 26").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


End Select

cel = Range("C1").Value 'Jet Pipe'

Select Case cel

Case 1 'Abrir Jet Pipe'

ActiveSheet.Shapes("Picture 34").Visible = False
ActiveSheet.Shapes("Picture 34,1").Visible = True
ActiveSheet.Shapes("Picture 34,2").Visible = False
ActiveSheet.Shapes("Conector angulado 218").Visible = True
ActiveSheet.Shapes("Conector reto 208").Visible = True
ActiveSheet.Shapes("Conector reto 213").Visible = True
ActiveSheet.Shapes("Conector reto 215").Visible = True
ActiveSheet.Shapes("Conector reto 206").Visible = True
ActiveSheet.Shapes("Conector angulado 223").Visible = False
ActiveSheet.Shapes("Conector reto 222").Visible = False
ActiveSheet.Shapes("Conector reto 221").Visible = False
ActiveSheet.Shapes("Conector reto 220").Visible = False
ActiveSheet.Shapes("Conector reto 224").Visible = False
ActiveSheet.Shapes("Conector reto 226").Visible = False
ActiveSheet.Shapes("Conector reto 244").Visible = False
ActiveSheet.Shapes("Conector reto 254").Visible = False
ActiveSheet.Shapes("Conector angulado 245").Visible = False
ActiveSheet.Shapes("Conector reto 251").Visible = False
ActiveSheet.Shapes("Conector reto 252").Visible = False
ActiveSheet.Shapes("Conector angulado 253").Visible = False
ActiveSheet.Shapes("Conector reto 250").Visible = False
ActiveSheet.Shapes("Conector reto 249").Visible = False
ActiveSheet.Shapes("Conector reto 240").Visible = False
ActiveSheet.Shapes("Conector angulado 242").Visible = False
ActiveSheet.Shapes("Conector reto 133").Visible = True
ActiveSheet.Shapes("Conector angulado 137").Visible = True
ActiveSheet.Shapes("Conector reto 21").Visible = True
ActiveSheet.Shapes("Conector reto 47").Visible = False
ActiveSheet.Shapes("Conector reto 144").Visible = True
ActiveSheet.Shapes("Conector reto 145").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Conector angulado 237").Visible = True
ActiveSheet.Shapes("Picture 129").Visible = False

Case 2 'Neutro Jet Pipe'

ActiveSheet.Shapes("Picture 34").Visible = True
ActiveSheet.Shapes("Picture 34,1").Visible = False
ActiveSheet.Shapes("Picture 34,2").Visible = False
ActiveSheet.Shapes("Conector angulado 218").Visible = False
ActiveSheet.Shapes("Conector reto 208").Visible = False
ActiveSheet.Shapes("Conector reto 213").Visible = False
ActiveSheet.Shapes("Conector reto 215").Visible = False
ActiveSheet.Shapes("Conector reto 206").Visible = False
ActiveSheet.Shapes("Conector angulado 223").Visible = True
ActiveSheet.Shapes("Conector reto 222").Visible = True
ActiveSheet.Shapes("Conector reto 221").Visible = True
ActiveSheet.Shapes("Conector reto 220").Visible = True
ActiveSheet.Shapes("Conector reto 224").Visible = False
ActiveSheet.Shapes("Conector reto 226").Visible = True
ActiveSheet.Shapes("Conector reto 244").Visible = False
ActiveSheet.Shapes("Conector reto 254").Visible = False
ActiveSheet.Shapes("Conector angulado 245").Visible = False
ActiveSheet.Shapes("Conector reto 251").Visible = False
ActiveSheet.Shapes("Conector reto 252").Visible = False
ActiveSheet.Shapes("Conector angulado 253").Visible = False
ActiveSheet.Shapes("Conector reto 250").Visible = False
ActiveSheet.Shapes("Conector reto 249").Visible = False
ActiveSheet.Shapes("Conector reto 240").Visible = True
ActiveSheet.Shapes("Conector reto 207").Visible = True
ActiveSheet.Shapes("Conector angulado 242").Visible = True
ActiveSheet.Shapes("Conector reto 207").Visible = True
ActiveSheet.Shapes("Conector reto 209").Visible = True
ActiveSheet.Shapes("Conector angulado 237").Visible = True
ActiveSheet.Shapes("Conector reto 235").Visible = True
ActiveSheet.Shapes("Conector reto 234").Visible = True
ActiveSheet.Shapes("Conector reto 239").Visible = True
ActiveSheet.Shapes("Conector reto 133").Visible = False
ActiveSheet.Shapes("Conector angulado 137").Visible = False
ActiveSheet.Shapes("Conector reto 21").Visible = False
ActiveSheet.Shapes("Conector reto 47").Visible = False
ActiveSheet.Shapes("Conector reto 144").Visible = True
ActiveSheet.Shapes("Conector reto 145").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 3 'Fechar Jet Pipe'

ActiveSheet.Shapes("Picture 34").Visible = False
ActiveSheet.Shapes("Picture 34,1").Visible = False
ActiveSheet.Shapes("Picture 34,2").Visible = True
ActiveSheet.Shapes("Conector angulado 218").Visible = False
ActiveSheet.Shapes("Conector reto 208").Visible = False
ActiveSheet.Shapes("Conector reto 213").Visible = False
ActiveSheet.Shapes("Conector reto 215").Visible = False
ActiveSheet.Shapes("Conector reto 206").Visible = False
ActiveSheet.Shapes("Conector angulado 223").Visible = True
ActiveSheet.Shapes("Conector reto 222").Visible = True
ActiveSheet.Shapes("Conector reto 221").Visible = True
ActiveSheet.Shapes("Conector reto 220").Visible = True
ActiveSheet.Shapes("Conector reto 224").Visible = True
ActiveSheet.Shapes("Conector reto 226").Visible = False
ActiveSheet.Shapes("Conector reto 244").Visible = True
ActiveSheet.Shapes("Conector reto 254").Visible = True
ActiveSheet.Shapes("Conector angulado 245").Visible = True
ActiveSheet.Shapes("Conector reto 251").Visible = True
ActiveSheet.Shapes("Conector reto 252").Visible = True
ActiveSheet.Shapes("Conector angulado 253").Visible = True
ActiveSheet.Shapes("Conector reto 250").Visible = True
ActiveSheet.Shapes("Conector reto 249").Visible = True
ActiveSheet.Shapes("Conector reto 240").Visible = False
ActiveSheet.Shapes("Conector reto 207").Visible = False
ActiveSheet.Shapes("Conector angulado 242").Visible = False
ActiveSheet.Shapes("Conector reto 207").Visible = True
ActiveSheet.Shapes("Conector reto 209").Visible = True
ActiveSheet.Shapes("Conector angulado 237").Visible = False
ActiveSheet.Shapes("Conector reto 235").Visible = True
ActiveSheet.Shapes("Conector reto 234").Visible = True
ActiveSheet.Shapes("Conector reto 239").Visible = True
ActiveSheet.Shapes("Conector reto 133").Visible = False
ActiveSheet.Shapes("Conector angulado 137").Visible = False
ActiveSheet.Shapes("Conector reto 21").Visible = False
ActiveSheet.Shapes("Conector reto 47").Visible = True
ActiveSheet.Shapes("Conector reto 144").Visible = False
ActiveSheet.Shapes("Conector reto 145").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


End Select

cel = Range("c3").Value 'Automático + Jet Pipe'

Select Case cel

Case 33 'Automático + Abrir Jet Pipe'
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = True
ActiveSheet.Shapes("Conector reto 147").Visible = True
ActiveSheet.Shapes("Conector reto 148").Visible = False
ActiveSheet.Shapes("Conector reto 55").Visible = True
ActiveSheet.Shapes("Conector reto 61").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = True
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 36 'Automático + Neutro Jet Pipe'
ActiveSheet.Shapes("Conector reto 151").Visible = True
ActiveSheet.Shapes("Conector reto 150").Visible = True
ActiveSheet.Shapes("Conector reto 147").Visible = False
ActiveSheet.Shapes("Conector reto 148").Visible = False
ActiveSheet.Shapes("Conector reto 55").Visible = False
ActiveSheet.Shapes("Conector reto 61").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = True
ActiveSheet.Shapes("Conector reto 143").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 39 'Automático + Fechar Jet Pipe'
ActiveSheet.Shapes("Conector reto 151").Visible = True
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 147").Visible = False
ActiveSheet.Shapes("Conector reto 148").Visible = True
ActiveSheet.Shapes("Conector reto 55").Visible = False
ActiveSheet.Shapes("Conector reto 61").Visible = True
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


End Select

cel = Range("A3").Value 'Manual + Jet Pipe'

Select Case cel

Case 84 'Manual + Abrir Jet Pipe'
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = True
ActiveSheet.Shapes("Conector reto 157").Visible = True
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False


Case 88 'Manual + Neutro Jet Pipe'
ActiveSheet.Shapes("Conector reto 152").Visible = True
ActiveSheet.Shapes("Conector reto 155").Visible = True
ActiveSheet.Shapes("Conector reto 156").Visible = True
ActiveSheet.Shapes("Conector reto 157").Visible = True
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

Case 92 'Manual + Fechar Jet Pipe'
ActiveSheet.Shapes("Conector reto 152").Visible = True
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 156").Visible = True
ActiveSheet.Shapes("Conector reto 157").Visible = True
ActiveSheet.Shapes("Conector Angulado 169").Visible = False
ActiveSheet.Shapes("Conector angulado 166").Visible = False
ActiveSheet.Shapes("Conector reto 177").Visible = False
ActiveSheet.Shapes("Conector angulado 174").Visible = False
ActiveSheet.Shapes("Conector reto 178").Visible = False
ActiveSheet.Shapes("Conector reto 180").Visible = False
ActiveSheet.Shapes("Conector reto 182").Visible = False
ActiveSheet.Shapes("Conector reto 184").Visible = False
ActiveSheet.Shapes("Conector angulado 186").Visible = False
ActiveSheet.Shapes("Conector reto 185").Visible = False
ActiveSheet.Shapes("Conector reto 167").Visible = False
ActiveSheet.Shapes("Conector Angulado 163").Visible = False
ActiveSheet.Shapes("Conector reto 164").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = True
ActiveSheet.Shapes("Conector Angulado 198").Visible = True
ActiveSheet.Shapes("Picture 10").Visible = False
ActiveSheet.Shapes("Picture 10,1").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = False
ActiveSheet.Shapes("Conector reto 187").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = False
ActiveSheet.Shapes("Conector reto 189").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = False

End Select

cel = Range("B3").Value 'HCP Neutro 1 + Comando da supervisório'

Select Case cel

Case 64 'HCP Neutro + Abrir no Supervisório'
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 134").Visible = False
ActiveSheet.Shapes("Conector Angulado 124").Visible = False
ActiveSheet.Shapes("Conector reto 127").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = True
ActiveSheet.Shapes("Conector angulado 166").Visible = True
ActiveSheet.Shapes("Conector reto 177").Visible = True
ActiveSheet.Shapes("Conector angulado 174").Visible = True
ActiveSheet.Shapes("Conector reto 178").Visible = True
ActiveSheet.Shapes("Conector reto 180").Visible = True
ActiveSheet.Shapes("Conector reto 182").Visible = True
ActiveSheet.Shapes("Conector reto 184").Visible = True
ActiveSheet.Shapes("Conector angulado 186").Visible = True
ActiveSheet.Shapes("Conector reto 185").Visible = True
ActiveSheet.Shapes("Conector reto 167").Visible = True
ActiveSheet.Shapes("Conector Angulado 163").Visible = True
ActiveSheet.Shapes("Conector reto 164").Visible = True
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector Angulado 122").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = False
ActiveSheet.Shapes("Conector Angulado 198").Visible = False
ActiveSheet.Shapes("Picture 10").Visible = True
ActiveSheet.Shapes("Picture 10,1").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = True
ActiveSheet.Shapes("Conector reto 187").Visible = True
ActiveSheet.Shapes("Picture 129").Visible = False


Case 32 'HCP Neutro + Fechar no Supervisório'
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 134").Visible = False
ActiveSheet.Shapes("Conector Angulado 124").Visible = False
ActiveSheet.Shapes("Conector reto 127").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = True
ActiveSheet.Shapes("Conector angulado 166").Visible = True
ActiveSheet.Shapes("Conector reto 177").Visible = True
ActiveSheet.Shapes("Conector angulado 174").Visible = True
ActiveSheet.Shapes("Conector reto 178").Visible = True
ActiveSheet.Shapes("Conector reto 180").Visible = True
ActiveSheet.Shapes("Conector reto 182").Visible = True
ActiveSheet.Shapes("Conector reto 184").Visible = True
ActiveSheet.Shapes("Conector angulado 186").Visible = True
ActiveSheet.Shapes("Conector reto 185").Visible = True
ActiveSheet.Shapes("Conector reto 167").Visible = True
ActiveSheet.Shapes("Conector Angulado 163").Visible = True
ActiveSheet.Shapes("Conector reto 164").Visible = True
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector Angulado 122").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = False
ActiveSheet.Shapes("Conector Angulado 198").Visible = False
ActiveSheet.Shapes("Picture 10").Visible = True
ActiveSheet.Shapes("Picture 10,1").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 199").Visible = True
ActiveSheet.Shapes("Conector reto 189").Visible = True
ActiveSheet.Shapes("Picture 129").Visible = False

Case 96 'HCP Neutro + Automático no Supervisório'
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 134").Visible = False
ActiveSheet.Shapes("Conector Angulado 124").Visible = False
ActiveSheet.Shapes("Conector reto 127").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = True
ActiveSheet.Shapes("Conector angulado 166").Visible = True
ActiveSheet.Shapes("Conector reto 177").Visible = True
ActiveSheet.Shapes("Conector angulado 174").Visible = True
ActiveSheet.Shapes("Conector reto 178").Visible = True
ActiveSheet.Shapes("Conector reto 180").Visible = True
ActiveSheet.Shapes("Conector reto 182").Visible = True
ActiveSheet.Shapes("Conector reto 184").Visible = True
ActiveSheet.Shapes("Conector angulado 186").Visible = True
ActiveSheet.Shapes("Conector reto 185").Visible = True
ActiveSheet.Shapes("Conector reto 167").Visible = True
ActiveSheet.Shapes("Conector Angulado 163").Visible = True
ActiveSheet.Shapes("Conector reto 164").Visible = True
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector Angulado 122").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = False
ActiveSheet.Shapes("Conector Angulado 198").Visible = False
ActiveSheet.Shapes("Picture 10").Visible = True
ActiveSheet.Shapes("Picture 10,1").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = True
ActiveSheet.Shapes("Conector reto 187").Visible = True
ActiveSheet.Shapes("Conector reto 199").Visible = True
ActiveSheet.Shapes("Conector reto 189").Visible = True
ActiveSheet.Shapes("Picture 129").Visible = False

Case 128 'HCP Neutro + Manual no Supervisório'
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector angulado 129").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector angulado 154").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 201").Visible = False
ActiveSheet.Shapes("Conector reto 134").Visible = False
ActiveSheet.Shapes("Conector Angulado 124").Visible = False
ActiveSheet.Shapes("Conector reto 127").Visible = False
ActiveSheet.Shapes("Conector Angulado 169").Visible = True
ActiveSheet.Shapes("Conector angulado 166").Visible = True
ActiveSheet.Shapes("Conector reto 177").Visible = True
ActiveSheet.Shapes("Conector angulado 174").Visible = True
ActiveSheet.Shapes("Conector reto 178").Visible = True
ActiveSheet.Shapes("Conector reto 180").Visible = True
ActiveSheet.Shapes("Conector reto 182").Visible = True
ActiveSheet.Shapes("Conector reto 184").Visible = True
ActiveSheet.Shapes("Conector angulado 186").Visible = True
ActiveSheet.Shapes("Conector reto 185").Visible = True
ActiveSheet.Shapes("Conector reto 167").Visible = True
ActiveSheet.Shapes("Conector Angulado 163").Visible = True
ActiveSheet.Shapes("Conector reto 164").Visible = True
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector angulado 139").Visible = False
ActiveSheet.Shapes("Conector angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector angulado 141").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector angulado 142").Visible = False
ActiveSheet.Shapes("Conector angulado 149").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 195").Visible = False
ActiveSheet.Shapes("Conector Angulado 122").Visible = False
ActiveSheet.Shapes("Conector reto 204").Visible = False
ActiveSheet.Shapes("Conector Angulado 198").Visible = False
ActiveSheet.Shapes("Picture 10").Visible = True
ActiveSheet.Shapes("Picture 10,1").Visible = True
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 188").Visible = True
ActiveSheet.Shapes("Conector reto 187").Visible = True
ActiveSheet.Shapes("Conector reto 199").Visible = True
ActiveSheet.Shapes("Conector reto 189").Visible = True
ActiveSheet.Shapes("Picture 129").Visible = False

End Select


cel = Range("B3").Value 'Abrir HCP'

Select Case cel


Case 66 'Abrir HCP + Abrir Supervisório'
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = True
ActiveSheet.Shapes("Picture 15").Visible = True
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector Angulado 139").Visible = False
ActiveSheet.Shapes("Conector Angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector Angulado 149").Visible = False
ActiveSheet.Shapes("Conector Angulado 142").Visible = False
ActiveSheet.Shapes("Conector Angulado 141").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector Angulado 154").Visible = False
ActiveSheet.Shapes("Conector Angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector reto 160").Visible = False
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False

ActiveSheet.Shapes("Conector Angulado 211").Visible = True
ActiveSheet.Shapes("Conector Angulado 212").Visible = True
ActiveSheet.Shapes("Conector Angulado 230").Visible = True
ActiveSheet.Shapes("Conector reto 232").Visible = True
ActiveSheet.Shapes("Conector reto 228").Visible = True
ActiveSheet.Shapes("Conector reto 225").Visible = True
ActiveSheet.Shapes("Conector reto 217").Visible = True
ActiveSheet.Shapes("Conector reto 216").Visible = True
ActiveSheet.Shapes("Conector reto 214").Visible = True
ActiveSheet.Shapes("Conector reto 233").Visible = True
ActiveSheet.Shapes("Conector reto 236").Visible = True
ActiveSheet.Shapes("Conector reto 238").Visible = True
ActiveSheet.Shapes("Conector reto 202").Visible = True
ActiveSheet.Shapes("Conector reto 205").Visible = True
ActiveSheet.Shapes("Conector reto 243").Visible = True
ActiveSheet.Shapes("Conector reto 246").Visible = True


Case 33 'Abrir HCP + Fechar Supervisório'
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = True
ActiveSheet.Shapes("Picture 15").Visible = True
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector Angulado 139").Visible = False
ActiveSheet.Shapes("Conector Angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector Angulado 211").Visible = True
ActiveSheet.Shapes("Conector Angulado 212").Visible = True
ActiveSheet.Shapes("Conector Angulado 230").Visible = True
ActiveSheet.Shapes("Conector reto 232").Visible = True
ActiveSheet.Shapes("Conector reto 228").Visible = True
ActiveSheet.Shapes("Conector reto 225").Visible = True
ActiveSheet.Shapes("Conector reto 217").Visible = True
ActiveSheet.Shapes("Conector reto 216").Visible = True
ActiveSheet.Shapes("Conector reto 214").Visible = True
ActiveSheet.Shapes("Conector Angulado 149").Visible = False
ActiveSheet.Shapes("Conector Angulado 142").Visible = False
ActiveSheet.Shapes("Conector Angulado 141").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector Angulado 154").Visible = False
ActiveSheet.Shapes("Conector Angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector reto 233").Visible = True
ActiveSheet.Shapes("Conector reto 236").Visible = True
ActiveSheet.Shapes("Conector reto 238").Visible = True
ActiveSheet.Shapes("Conector reto 160").Visible = False
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 202").Visible = True
ActiveSheet.Shapes("Conector reto 205").Visible = True
ActiveSheet.Shapes("Conector reto 243").Visible = True
ActiveSheet.Shapes("Conector reto 246").Visible = True

Case 99 'Abrir HCP + Automático Supervisório'
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = True
ActiveSheet.Shapes("Picture 15").Visible = True
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector Angulado 139").Visible = False
ActiveSheet.Shapes("Conector Angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector Angulado 211").Visible = True
ActiveSheet.Shapes("Conector Angulado 212").Visible = True
ActiveSheet.Shapes("Conector Angulado 230").Visible = True
ActiveSheet.Shapes("Conector reto 232").Visible = True
ActiveSheet.Shapes("Conector reto 228").Visible = True
ActiveSheet.Shapes("Conector reto 225").Visible = True
ActiveSheet.Shapes("Conector reto 217").Visible = True
ActiveSheet.Shapes("Conector reto 216").Visible = True
ActiveSheet.Shapes("Conector reto 214").Visible = True
ActiveSheet.Shapes("Conector Angulado 149").Visible = False
ActiveSheet.Shapes("Conector Angulado 142").Visible = False
ActiveSheet.Shapes("Conector Angulado 141").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector Angulado 154").Visible = False
ActiveSheet.Shapes("Conector Angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector reto 233").Visible = True
ActiveSheet.Shapes("Conector reto 236").Visible = True
ActiveSheet.Shapes("Conector reto 238").Visible = True
ActiveSheet.Shapes("Conector reto 160").Visible = False
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 202").Visible = True
ActiveSheet.Shapes("Conector reto 205").Visible = True
ActiveSheet.Shapes("Conector reto 243").Visible = True
ActiveSheet.Shapes("Conector reto 246").Visible = True

Case 132 'Abrir HCP + Manual Supervisório'
ActiveSheet.Shapes("Picture 29").Visible = False
ActiveSheet.Shapes("Picture 29,1").Visible = False
ActiveSheet.Shapes("Picture 29,2").Visible = False
ActiveSheet.Shapes("Picture 129").Visible = True
ActiveSheet.Shapes("Picture 15").Visible = True
ActiveSheet.Shapes("Picture 5").Visible = False
ActiveSheet.Shapes("Picture 5,1").Visible = False
ActiveSheet.Shapes("Conector Angulado 136").Visible = False
ActiveSheet.Shapes("Conector Angulado 139").Visible = False
ActiveSheet.Shapes("Conector Angulado 197").Visible = False
ActiveSheet.Shapes("Conector reto 175").Visible = False
ActiveSheet.Shapes("Conector reto 176").Visible = False
ActiveSheet.Shapes("Conector reto 179").Visible = False
ActiveSheet.Shapes("Conector reto 181").Visible = False
ActiveSheet.Shapes("Conector reto 183").Visible = False
ActiveSheet.Shapes("Conector reto 200").Visible = False
ActiveSheet.Shapes("Conector Angulado 211").Visible = True
ActiveSheet.Shapes("Conector Angulado 212").Visible = True
ActiveSheet.Shapes("Conector Angulado 230").Visible = True
ActiveSheet.Shapes("Conector reto 232").Visible = True
ActiveSheet.Shapes("Conector reto 228").Visible = True
ActiveSheet.Shapes("Conector reto 225").Visible = True
ActiveSheet.Shapes("Conector reto 217").Visible = True
ActiveSheet.Shapes("Conector reto 216").Visible = True
ActiveSheet.Shapes("Conector reto 214").Visible = True
ActiveSheet.Shapes("Conector Angulado 149").Visible = False
ActiveSheet.Shapes("Conector Angulado 142").Visible = False
ActiveSheet.Shapes("Conector Angulado 141").Visible = False
ActiveSheet.Shapes("Conector Angulado 196").Visible = False
ActiveSheet.Shapes("Conector reto 194").Visible = False
ActiveSheet.Shapes("Conector reto 193").Visible = False
ActiveSheet.Shapes("Conector reto 191").Visible = False
ActiveSheet.Shapes("Conector reto 192").Visible = False
ActiveSheet.Shapes("Conector reto 190").Visible = False
ActiveSheet.Shapes("Conector Angulado 153").Visible = False
ActiveSheet.Shapes("Conector Angulado 154").Visible = False
ActiveSheet.Shapes("Conector Angulado 203").Visible = False
ActiveSheet.Shapes("Conector reto 152").Visible = False
ActiveSheet.Shapes("Conector reto 155").Visible = False
ActiveSheet.Shapes("Conector reto 143").Visible = False
ActiveSheet.Shapes("Conector reto 140").Visible = False
ActiveSheet.Shapes("Conector reto 151").Visible = False
ActiveSheet.Shapes("Conector reto 150").Visible = False
ActiveSheet.Shapes("Conector reto 157").Visible = False
ActiveSheet.Shapes("Conector reto 233").Visible = True
ActiveSheet.Shapes("Conector reto 236").Visible = True
ActiveSheet.Shapes("Conector reto 238").Visible = True
ActiveSheet.Shapes("Conector reto 160").Visible = False
ActiveSheet.Shapes("Conector reto 171").Visible = False
ActiveSheet.Shapes("Conector reto 170").Visible = False
ActiveSheet.Shapes("Conector reto 159").Visible = False
ActiveSheet.Shapes("Conector reto 22").Visible = False
ActiveSheet.Shapes("Conector reto 56").Visible = False
ActiveSheet.Shapes("Conector reto 172").Visible = False
ActiveSheet.Shapes("Conector reto 173").Visible = False
ActiveSheet.Shapes("Conector reto 202").Visible = True
ActiveSheet.Shapes("Conector reto 205").Visible = True
ActiveSheet.Shapes("Conector reto 243").Visible = True
ActiveSheet.Shapes("Conector reto 246").Visible = True

End Select


End Sub

 

Editado por DiF
Botão CODE <>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Não há ordem. A planilha é para um fluxograma de um sistema, que muda de acordo com o jeito que é operado. Ou seja, há vários modos de operação. E nenhum é sequencial ou em ordem.

 

Att

 

Rafael

Compartilhar este post


Link para o post
Compartilhar em outros sites
Em 17/08/2018 às 17:02, Rafael Delevidove disse:

Não há ordem. A planilha é para um fluxograma de um sistema, que muda de acordo com o jeito que é operado. Ou seja, há vários modos de operação. E nenhum é sequencial ou em ordem.

 

Att

 

Rafael

 

Você pode postar sua planilha para tentarmos lhe ajudar. 

Compartilhar este post


Link para o post
Compartilhar em outros sites

@Rafael Delevidove , bem vindo ao Fórum Office do Clube do Hardware.

 

Não analisei profundamente seu código mas percebe-se que, apesar de ser longo, tem muitas partes que se repetem ou formam um conjunto e que portanto poderiam ser melhor parametrizadas.

 

Acho que você deveria mesmo antes de tudo é "perder" um pouco de tempo para planejar e organizar melhor, começando não no código, mas lá na sua(s) planilha(s):

 

  1. Renomeie os objetos (figuras), dando um nome preferivelmente mais curto e que tenham um significado condizente a o que se destina, ao invés dos nomes automáticos gerados pelo Excel. Por exemplo, supondo que numa parte de seu fluxograma você tenha a figura de uma bomba centrífuga 1 conectada ao reservatório B, você renomearia "Picture 53" para "BC1", "Picture 121" para "ResB" e "Conector Angulado 198"  algo como "BC1_ResB". Além de ficar mais intuitivo é melhor para manutenção da planilha e do código VBA e de bônus encolhe o tamanho do código.
  2. Agrupe figuras que formam um conjunto único: na planilha, selecione uma ou mais formas com a tecla Control, clique como o botão direito sobre uma delas e escolha Agrupar e também já escolha um nome significativo ao conjunto. Por exemplo, se você agrupar BC1, ResB e BC1_ResB, renomeando para "CjBC1" você pode controlar a visibilidade dos 3 itens de uma só vez: ActiveSheet.Shapes("CjBC1").Visible = False.
  3. Também daria, no VBA, para criar um ShapeRange com mais de uma forma ou um Array de formas, mas penso que da forma descrita acima ficaria mais organizado.
  4. Use no início e fim dos trechos o With/End With ao invés de repetir sempre ActiveSheet em cada linha.
  5. Se mesmo depois de tudo isso continuar dando "Procedimento muito grande", você poderia manter os nomes das formas e atribuição de visibilidade numa planilha oculta e usar o VBA só para ler/invertê-las

Mas o melhor mesmo seria se você anexasse seu modelo para análise, como o colega @Erik Wesley mencionou acima.

Compartilhar este post


Link para o post
Compartilhar em outros sites
1 hora atrás, Rafael Delevidove disse:

Quanto a anexar a planilha, não consigo, devido a extensão da mesma ser .xlsm.

 

É só você zipar o arquivo que o fórum não irá recusar.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisar ser um membro para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora





Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas publicações sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×