Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default De selecting a range after a copy and paste is performed


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default De selecting a range after a copy and paste is performed

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default De selecting a range after a copy and paste is performed


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default De selecting a range after a copy and paste is performed

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy paste without selecting sheet or range Richard Excel Programming 2 May 23rd 08 12:22 PM
Selecting range of cells to copy using a variable [email protected] Excel Programming 9 January 26th 08 02:37 PM
Selecting data to copy and paste Black country boy Excel Programming 6 April 24th 07 11:26 PM
Auto copy/ paste on relevant work sheet when selecting list item Niraj Manglam Excel Programming 1 June 6th 06 03:13 PM
paste grays out after function performed stt_d31[_3_] Excel Programming 2 June 15th 05 06:28 AM


All times are GMT +1. The time now is 09:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"