Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default paste special

im getting a problem -

'Run-time error '1004':

Paste Special Method of Range Class failed

Problem code is

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

it works sometimes tho - basically the code opens up a workbook - adds a new
sheet and pastes the values into cell A1.

any ideas?

thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default paste special

Are any of the cells you're copying, merged?


--
HTH
Roger
Shaftesbury (UK)

"Ciara" wrote in message
...
im getting a problem -

'Run-time error '1004':

Paste Special Method of Range Class failed

Problem code is

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

it works sometimes tho - basically the code opens up a workbook - adds a
new
sheet and pastes the values into cell A1.

any ideas?

thanks,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default paste special

yes they are - if i do it manually it works but the code doesn't work? -
basically I paste special values and then paste special formats..... - i
dont' know why it won't work?

"Roger Whitehead" wrote:

Are any of the cells you're copying, merged?


--
HTH
Roger
Shaftesbury (UK)

"Ciara" wrote in message
...
im getting a problem -

'Run-time error '1004':

Paste Special Method of Range Class failed

Problem code is

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

it works sometimes tho - basically the code opens up a workbook - adds a
new
sheet and pastes the values into cell A1.

any ideas?

thanks,




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default paste special

Try something like

For Each cel In Sheets(1).Range("A1:D5")
On Error Resume Next
Sheets(3).Range(cel.Address) = cel
Next

This will ignore merged cells


--
HTH
Roger
Shaftesbury (UK)


"Ciara" wrote in message
...
yes they are - if i do it manually it works but the code doesn't work? -
basically I paste special values and then paste special formats..... - i
dont' know why it won't work?

"Roger Whitehead" wrote:

Are any of the cells you're copying, merged?


--
HTH
Roger
Shaftesbury (UK)

"Ciara" wrote in message
...
im getting a problem -

'Run-time error '1004':

Paste Special Method of Range Class failed

Problem code is

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False

it works sometimes tho - basically the code opens up a workbook - adds
a
new
sheet and pastes the values into cell A1.

any ideas?

thanks,






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default paste special

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False


Is Selection a single cell or a range of cells?

--
George Nicholson

Remove 'Junk' from return address.


"Ciara" wrote in message
...
yes they are - if i do it manually it works but the code doesn't work? -
basically I paste special values and then paste special formats..... - i
dont' know why it won't work?

"Roger Whitehead" wrote:

Are any of the cells you're copying, merged?


--
HTH
Roger
Shaftesbury (UK)

"Ciara" wrote in message
...
im getting a problem -

'Run-time error '1004':

Paste Special Method of Range Class failed

Problem code is

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False

it works sometimes tho - basically the code opens up a workbook - adds
a
new
sheet and pastes the values into cell A1.

any ideas?

thanks,






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
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
'paste special', 'paste link' formatting transfer jrebello Excel Discussion (Misc queries) 2 July 25th 07 08:46 AM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM


All times are GMT +1. The time now is 10:23 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"