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
Por xandao6
Posts
#14716
Tenho o seguinte codigo:
Código: Selecionar todos
Dim resultado As VbMsgBoxResult
     resultado = MsgBox("R$ " & Format(Range("L42").Value, "#,###.00") + vbCrLf + "" + vbCrLf + "Deseja Visualizar a Impressão ?", vbYesNo, "Resultado")
     If resultado = vbYes Then
        Sheets("IMP").Select
        Application.Dialogs(xlDialogPrintPreview).Show
        Sheets("BASE").Select
     Else
     End If
O "L42" está em outra planilha, como faço a correção ?
Avatar do usuário
Por gfranco
Avatar
#14719
Boa noite.
Indique o codename da planilha onde o valor está. No exemplo eu indico que o valor está na plan12...
Dim resultado As VbMsgBoxResult
resultado = MsgBox("R$ " & Format(plan12.Range("L42").Value, "#,###.00") + vbCrLf + "" + vbCrLf + "Deseja Visualizar a Impressão ?", vbYesNo, "Resultado")
If resultado = vbYes Then
Sheets("IMP").Select
Application.Dialogs(xlDialogPrintPreview).Show
Sheets("BASE").Select
Else
End If
Por xandao6
Posts
#14720
Se chama "IMP", tentei planIMP e não deu certo
Por xandao6
Posts
#14722
Consegui! Coloquei Sheets("IMP").Range...
Vlw
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