PC Review


Reply
Thread Tools Rate Thread

De selecting a range after a copy and paste is performed

 
 
ML0940
Guest
Posts: n/a
 
      21st Jul 2008

Hi
In the below code, I am copying a range from Sheet 1 and with the
PasteValues method, I am pasting that range to a cell on Sheet 2.
The problem I am having is that I can not "de select" the selected (copied)
range on Sheet 1. I have tried doing an ESC using SendKeys but that doesn't
seem to want to work.

Any ideas?
Is there a select = False or some code that I am missing?

Thanks!
ML


'Copy Bills
Sheets(1).Activate
Sh1bw.Offset(0, 2).Copy 'Copy Column C bills

Sheets(2).Activate
Sh2bw.Offset(0, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone 'Paste bills
one column over from Sh2bw
 
Reply With Quote
 
 
 
 
FSt1
Guest
Posts: n/a
 
      21st Jul 2008
hi
not sure exactly what you mean by "de select". do you mean remove from the
clipboard?
CutCopyMode = False

repost to clairfy.
Regards
FSt1

"ML0940" wrote:

>
> Hi
> In the below code, I am copying a range from Sheet 1 and with the
> PasteValues method, I am pasting that range to a cell on Sheet 2.
> The problem I am having is that I can not "de select" the selected (copied)
> range on Sheet 1. I have tried doing an ESC using SendKeys but that doesn't
> seem to want to work.
>
> Any ideas?
> Is there a select = False or some code that I am missing?
>
> Thanks!
> ML
>
>
> 'Copy Bills
> Sheets(1).Activate
> Sh1bw.Offset(0, 2).Copy 'Copy Column C bills
>
> Sheets(2).Activate
> Sh2bw.Offset(0, 1).Select
> Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone 'Paste bills
> one column over from Sh2bw

 
Reply With Quote
 
ML0940
Guest
Posts: n/a
 
      21st Jul 2008

Yes, that is exactly what I was looking for
I did not know that this method existed.
Now that I looked it up in The help Screen
This is precisely what I needed
Application.CutCopyMode = True

It removed the rectangular selection box around the copied (source) range

Thank you very much!
ML

"FSt1" wrote:

> hi
> not sure exactly what you mean by "de select". do you mean remove from the
> clipboard?
> CutCopyMode = False
>
> repost to clairfy.
> Regards
> FSt1
>
> "ML0940" wrote:
>
> >
> > Hi
> > In the below code, I am copying a range from Sheet 1 and with the
> > PasteValues method, I am pasting that range to a cell on Sheet 2.
> > The problem I am having is that I can not "de select" the selected (copied)
> > range on Sheet 1. I have tried doing an ESC using SendKeys but that doesn't
> > seem to want to work.
> >
> > Any ideas?
> > Is there a select = False or some code that I am missing?
> >
> > Thanks!
> > ML
> >
> >
> > 'Copy Bills
> > Sheets(1).Activate
> > Sh1bw.Offset(0, 2).Copy 'Copy Column C bills
> >
> > Sheets(2).Activate
> > Sh2bw.Offset(0, 1).Select
> > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone 'Paste bills
> > one column over from Sh2bw

 
Reply With Quote
 
ML0940
Guest
Posts: n/a
 
      21st Jul 2008
FS
The interesting thing is that both True or False acheive the same result
Therefore, it does make more sense to say False
And this did precisely what I needed it to

Thank you again
ML

"FSt1" wrote:

> hi
> not sure exactly what you mean by "de select". do you mean remove from the
> clipboard?
> CutCopyMode = False
>
> repost to clairfy.
> Regards
> FSt1
>
> "ML0940" wrote:
>
> >
> > Hi
> > In the below code, I am copying a range from Sheet 1 and with the
> > PasteValues method, I am pasting that range to a cell on Sheet 2.
> > The problem I am having is that I can not "de select" the selected (copied)
> > range on Sheet 1. I have tried doing an ESC using SendKeys but that doesn't
> > seem to want to work.
> >
> > Any ideas?
> > Is there a select = False or some code that I am missing?
> >
> > Thanks!
> > ML
> >
> >
> > 'Copy Bills
> > Sheets(1).Activate
> > Sh1bw.Offset(0, 2).Copy 'Copy Column C bills
> >
> > Sheets(2).Activate
> > Sh2bw.Offset(0, 1).Select
> > Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone 'Paste bills
> > one column over from Sh2bw

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting Range Based on Cell Content then Copy/Paste to New Sheet,Looping pwk Microsoft Excel Programming 2 26th Sep 2009 02:18 PM
Selecting columns to copy and paste Sue Microsoft Excel Programming 2 4th Oct 2008 01:32 PM
Copy paste without selecting sheet or range Richard Microsoft Excel Programming 2 23rd May 2008 12:22 PM
Not Selecting Field Name When Trying To Copy & Paste Cells mcl Microsoft Access Queries 1 14th May 2008 12:42 PM
Selecting data to copy and paste =?Utf-8?B?QmxhY2sgY291bnRyeSBib3k=?= Microsoft Excel Programming 6 24th Apr 2007 11:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:27 PM.