No meu caso, era um erro parecido...
Apenas mudei a ordem da linha " Range("A1:D22").Activate "
Ela estava após habilitar o envio de e-mail, alterando para antes de habilitar, parou o erro:
___________________________________
'Código antigo:
Sub Enviar_cancelar_envio()
If ActiveWorkbook.EnvelopeVisible = False Then
ActiveWorkbook.EnvelopeVisible = True
Range("A1:D22").Activate
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
Else
ActiveWorkbook.EnvelopeVisible = False
Range("E1").Activate
End If
_________________________________________
'Segue o código que parou de dar o erro:
Sub Enviar_cancelar_envio()
If ActiveWorkbook.EnvelopeVisible = False Then
Range("A1:D22").Activate
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "E-Mail_Address_Here"
.Item.Subject = "My subject"
.Item.Send
End With
Else
ActiveWorkbook.EnvelopeVisible = False
Range("E1").Activate
End If
_______________________________________