I want to copy this to the clipboard:
F7and F9
This line copies F7 through F9
[vba]
Range("F9" & ",F7").Copy
[/vba]
thx
Printable View
I want to copy this to the clipboard:
F7and F9
This line copies F7 through F9
[vba]
Range("F9" & ",F7").Copy
[/vba]
thx
[VBA] Range("F7,F9").Copy Range("J10")
[/VBA]
Don't forget the Macro recorder!
Good Day Malcolm,
Good point about the recorder.
But this is slightly different. Copying the non-contiguous cells to a sheet works fine, but not to the windows clipboard. It copies and pastes a contiguous range- F7, F8, & F9 to the windows clipboard.
So when I paste I get data from F8 I do not want in it.
The only way I have figured out how to handle this is:
[VBA]
Range("F7,F9").Copy Range("IV1")
Range("IV1").Cut
Range("IV1").Copy Range("IV3")
Range("IV1").Delete Shift:=xlShiftUp
Range("IV1:IV2").Copy
[/VBA]
Doug,
Range("F7,F9").Copy works for me.
Rory,
The copy works,
but paste it to a notepad file, you will see it pastes the contents of f7,f8, and f9, not just f7 and f9
Oh OK. Is that actually your destination?
More or less.
Not to open a can of worms here, but it is to copy two email addresses to my email program send to field, so the clipboard is the copy to location.
SendMail method in VBA will only work up until a point w/ AOL.
I can either get the subjet or the send to address, but not both.
So I chose the subject.
Do you have Outlook? You can set that up to work with AOL's IMAP email.
I do have Outlook.
You will have to give me some idea of IMAP.... and what is involved.
thanks for the extra help on this, being out of scope... ;-)
I don't have the details here, but they should be on the AOL website. It's not that hard to set up as I recall (been a while since I actually used my AOL account to send any email!)
Interesting Doug.
You can simplify your intermediate step a bit though
[VBA]Range("E5, E9").Copy Range("IV1")
Range("IV1").CurrentRegion.Copy
[/VBA]
Thanks Malcolm,
sorry for the delay- did not get a notice anything had been updated. I just happened to check in...
cheers