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.
#18619
Bom dia! Por favor, gostaria de selecionar 2 ranges para enviar por email, contudo, não sei se é possível. Tentei algumas combinações diferentes como
ActiveSheet.Range("A2:D7").Select, ActiveSheet.Range("A19:D24").Select
ou
ActiveSheet.Range("A2:D7,A19:D24").Select

... mas não consigo envelopar 2 seleções diferentes. Anexo arquivo de teste funcional. Mas preciso selecionar e envelopar 2 ranges diferentes.


Sub EnviarTeste()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A2:D7").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.
With ActiveSheet.MailEnvelope
.Item.To = ActiveSheet.Range("F2").Text
.Item.Subject = ActiveSheet.Range("F3").Text
.Item.Send
End With
End Sub
Você não está autorizado a ver ou baixar esse anexo.
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