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.
Por Luciano021273
Posts
#13120
Boa tarde a todos!

Tenho uma planilha com um userform

Quando inicio a planilha a rotina chama meu userform e a plan fica invisivel deixando somente o userform

Mas quando preciso imprimir preciso que minha plan volte e após a impressão ele oculte novamente, deixando somente o userform aparente,

a não ser se de de imprimir com a plan oculta assim resolveria meu problema... segue o codigo que uso hoje, e em anexo estou enviando a planilha para testes,

codigo:

Application.Visible = True ' traz a plan


Dim IMPRI As Worksheet
Set IMPRI = Worksheets("Papel_de_Medidas")
Range("B2").Select

If cx_nome_cliente.Value = "" Then
MsgBox " SELECIONE ALGUM NOME e GERE ORÇAMENTO PARA PODER IMPRIMIR!", , ""
Exit Sub
End If
Plan24.Select
Range("B2").Select

C_AGENDA_DE_MEDIDAS.Hide
Application.Dialogs(xlDialogPrintPreview).Show
C_AGENDA_DE_MEDIDAS.Show

' Sheets("Papel_de_Medidas").Quit >>>>>>>>>testei não funcionou
Exit Sub


' Sheets("Papel_de_Medidas").Visible = False >>>>>>>> testei não funcionou



se alguém puder me ajudar, a fazer funcionar agradeço...

atenciosamente,
Você não está autorizado a ver ou baixar esse anexo.
Por Luciano021273
Posts
#13161
Boa tarde,
ainda não testei, o numero 1 entre () se refere a plan?
usaria true antes do comando impressão e false no final?
vou testar... Obrigado!
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