PC Review


Reply
Thread Tools Rate Thread

determining the cutcopy range progamatically

 
 
jc
Guest
Posts: n/a
 
      5th Jun 2008
is there a way to determine progamattically the range that is highlited with
a marquee while in cut or copy mode?
--
JC
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      5th Jun 2008
It would be the selection. You can use the address property. I don't have
excel running right now but it would be one of the following

SelAddress = selection.address

or

SelAddress = activecell.address

Make sure if it is in a different sheet or workbook that you include these
in the code.

I sometimes define the cut or copy Range like this

Set CopyRange = Workbooks("Book1.xls").sheets("Sheet1").Range("A10:C100")
Set PasteRange = Workbooks("Book2.xls").sheets("Sheet3").Range("D10")
CopyRange.Copy Destination:=PasteRange

CopyAddr = CopyRange.Address
PasteAddr = PasteRange.Address

"jc" wrote:

> is there a way to determine progamattically the range that is highlited with
> a marquee while in cut or copy mode?
> --
> JC

 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      5th Jun 2008
activating a macro will de-highlight the marquee.
having it highlighted within a macro requires that you tell it what
range to cut/copy/paste.
hope the information helps.

susan


On Jun 5, 12:36*pm, jc <j...@discussions.microsoft.com> wrote:
> is there a way to determine progamattically the range that is highlited *with
> a marquee while in cut or copy mode?
> --
> JC


 
Reply With Quote
 
jc
Guest
Posts: n/a
 
      5th Jun 2008
I don't think this is right. You can copy a cell and the change the
selection many times and the marquee stays with the copied cell.

I am working with a worksheet_selectionchange procedure that blows away the
marquee when i do something to the range with the marquee like change the
font or add a comment. I would like to determine the cut or copy range going
into the procedure and re cut or copy it on the way out.
--
JC


"Joel" wrote:

> It would be the selection. You can use the address property. I don't have
> excel running right now but it would be one of the following
>
> SelAddress = selection.address
>
> or
>
> SelAddress = activecell.address
>
> Make sure if it is in a different sheet or workbook that you include these
> in the code.
>
> I sometimes define the cut or copy Range like this
>
> Set CopyRange = Workbooks("Book1.xls").sheets("Sheet1").Range("A10:C100")
> Set PasteRange = Workbooks("Book2.xls").sheets("Sheet3").Range("D10")
> CopyRange.Copy Destination:=PasteRange
>
> CopyAddr = CopyRange.Address
> PasteAddr = PasteRange.Address
>
> "jc" wrote:
>
> > is there a way to determine progamattically the range that is highlited with
> > a marquee while in cut or copy mode?
> > --
> > JC

 
Reply With Quote
 
jc
Guest
Posts: n/a
 
      5th Jun 2008
actually in the macro I'm working with the marquee stays on until I do
something to the cell that has the marquee like change font or add or delete
a comment. If I don't do anything to the cell the marquee stays on after the
macro.
--
JC


"Susan" wrote:

> activating a macro will de-highlight the marquee.
> having it highlighted within a macro requires that you tell it what
> range to cut/copy/paste.
> hope the information helps.
>
> susan
>
>
> On Jun 5, 12:36 pm, jc <j...@discussions.microsoft.com> wrote:
> > is there a way to determine progamattically the range that is highlited with
> > a marquee while in cut or copy mode?
> > --
> > JC

>
>

 
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
CutCopy mode goes to False Steven Microsoft Excel Programming 1 20th Jun 2008 09:26 PM
CutCopy mode goes to False Steven Microsoft Access VBA Modules 1 20th Jun 2008 06:44 PM
Determining the size of a range. Dave the wave Microsoft Excel Programming 3 30th Jun 2004 01:47 AM
Determining last copied range R Avery Microsoft Excel Programming 2 13th Feb 2004 12:11 AM
Determining range Mike Macgowan Microsoft Excel Programming 3 31st Oct 2003 11:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:52 AM.