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 ThiagoN
#23575
boa noite

estou enviando um email automatico com os comandos abaixo, mas esta com erro na seguinte linha " With ActiveSheet.MailEnvelope"

segue comando..
Código: Selecionar todos
Private Sub Image3_Click()
     ' Select the range of cells on the active worksheet.
     Sheets("Banco de Horas").Select
    ActiveSheet.Range("A1:L42").Select
   
   ' Show the envelope on the ActiveWorkbook.
   ActiveWorkbook.EnvelopeVisible = True
   
   ' Set the optional introduction field thats adds
   ' some header text to the email body. It also sets
   ' the To and Subject lines. Finally the message
   ' is sent.
   
   
   ActiveWorkbook.EnvelopeVisible = True
    
    With ActiveSheet.MailEnvelope
    
      .Introduction = "Banco de Horas"
      .Item.To = ""
      .Item.CC = ""
      .Item.Send
   End With
   

End Sub
Agradeço a ajuda,
Avatar do usuário
Por alexandrevba
Avatar
#23675
Boa tarde!!

Qual o código e mensagem do erro?

Eu não tive problemas!


Att
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