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
#14914
Olá
Gostaria de saber, como posso tratar o erro da Exibição da planilha (Visible) e ocultação da mesma, na forma (VeryHidden), isto é, quando o Nome da planilha não existir e for invalido - evitar a notificação de erro e enviar ao usuário uma notificação do erro encontrado, e tambémse não haver erro - notificar como "Procedimento realizado com sucesso", Através da MSGBOX!
Segue o códido, o print do erro e a planilha em questãoi
Desde já agradeço
Imagem

Código:
Dim P As String

'Dim P as String = Nome da planilha
'-----------------------------------

Sub OcultarPlanilha(P As Worksheet)
'Sub Procedimento
'P = Parâmentro do tipo planilha

P.Visible = xlSheetVeryHidden ' xlSheethidden = Ocultar planilha


End Sub

Sub ReexibirPlanilha(P As Worksheet)
'Sub Procedimento
'P = Parâmentro do tipo planilha

P.Visible = xlSheetVisible ' xlSheetVIsible = Reexibir planilha
' Sheets("2").Visible = True

End Sub


Sub Ocultar()

P = InputBox("Nome da Planilha", "Ocultar Planilha")
' OcultarPlanilha Sheets(P)
Call OcultarPlanilha(Sheets(P))
End Sub

Sub Reexibir()

P = InputBox("Nome da Planilha", "Reexibir Planilha")
' OcultarPlanilha Sheets(P)
Call ReexibirPlanilha(Sheets(P))
End Sub

Private Sub CommandButton1_Click()

End Sub
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