Copy two ranges without the interval rows to the email
To help debug these type problems I sometimes resort to SELECTION.
I would do
union(range("A1:L2"),rng2=("A5:L5")).select
Then look at the worksheet to see what is selected.
Then try
set CopyRange = union(range("A1:L2"),rng2=("A5:L5"))
CopyRange.Select
And see if the same results occur. If this is correct then you can replace
your code with
set CopyRange = union(range("A1:L2"),rng2=("A5:L5"))
CopyRange.Copy
"chelsea" wrote:
Hi,
what i intend to do is that i just want to copy two
ranges(range("A1:L2"),rng2=("A5:L5")) from excel to an email.
i use the vba as below:
union(range("A1:L2"),rng2=("A5:L5")).copy
it can get the right result in the excel,while i paste it in the email it
display the whole range("a1:l5").
i am very confused about why it get the different result£¿
can anybody give a guide?
Regards,
Chelsea
|