View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Orr Gary Orr is offline
external usenet poster
 
Posts: 4
Default Range resizing itself

I think that my last attempt to post this blew up on me, so I hope that this
doesn't double up...

I have a fairly simple copy/paste VBA routine (Excel 2007) that works if the
range to paste into falls within the UsedRange of the worksheet, but which
resizes itself if not.

Here's the scenario:
Source (copy range): (A2:K2)

Destination Worksheet "UsedRange": (A1:P10)

If Paste Range is: (F2:P2) Success!!!

If Paste Range is: (G2:Q2) Needs User Interaction due to Prompt:
"Contents of Clipboard do not match selected... Paste... Anyway?"

I have checked all of the things (protected cells, etc) that I can think of,
and have even tried to expand the UsedRange by Inserting text into a cell
outside of the UsedRange (which it lets me do without any trouble and shows
an updated value when queried).

If I check the range to be pasted into via the debugger it shows the correct
number of columns, but if I view the selected range in Excel it stops at the
"previous" UsedRange.
Is there a setting that I can toggle to get past this?

I'm at a loss. Any assistance would be appreciated.

Gary