Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Paste special macro

If you're doing the .copy in code:

Option Explicit
Sub Macro3A()
Range("B6:H6").Copy
Worksheets("sheet2").Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

If you've already copied the range and want to paste to the activecell (you
already changed to the other sheet manually):

Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

jack wrote:

How do I change the first three lines of the macro below so that the paste
special statement will execute to the active cell of a separate worksheet
after making the manual copy selection ?

Sub Macro3()
Range("B6:H6").Select
Selection.Copy
Range("L6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
End Sub


--

Dave Peterson
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Paste special macro

For macro:
Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

I receive error message:
Run time error '1004':
Pastespecial method of Range class failed

What have I done wrong?

"Dave Peterson" wrote in message
...
If you're doing the .copy in code:

Option Explicit
Sub Macro3A()
Range("B6:H6").Copy
Worksheets("sheet2").Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

If you've already copied the range and want to paste to the activecell
(you
already changed to the other sheet manually):

Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

jack wrote:

How do I change the first three lines of the macro below so that the
paste
special statement will execute to the active cell of a separate worksheet
after making the manual copy selection ?

Sub Macro3()
Range("B6:H6").Select
Selection.Copy
Range("L6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
End Sub


--

Dave Peterson



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Paste special macro

Could be lots of things.

My first guess is that you didn't have anything copied (and ready to be pasted).

My second guess is that you went through the Tools|macro|macros dialog. That's
enough to kill the clipboard. Maybe you could use the same
tools|macro|macro|options to assign a shortcut key.

My third guess is that your receiving worksheet is protected.



jack wrote:

For macro:
Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

I receive error message:
Run time error '1004':
Pastespecial method of Range class failed

What have I done wrong?

"Dave Peterson" wrote in message
...
If you're doing the .copy in code:

Option Explicit
Sub Macro3A()
Range("B6:H6").Copy
Worksheets("sheet2").Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

If you've already copied the range and want to paste to the activecell
(you
already changed to the other sheet manually):

Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

jack wrote:

How do I change the first three lines of the macro below so that the
paste
special statement will execute to the active cell of a separate worksheet
after making the manual copy selection ?

Sub Macro3()
Range("B6:H6").Select
Selection.Copy
Range("L6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
End Sub


--

Dave Peterson


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Paste special macro

Thanks!!!!
Your second guess was it! I assigned a shortcut key and it worked as it
should.
Thanks again!

"Dave Peterson" wrote in message
...
Could be lots of things.

My first guess is that you didn't have anything copied (and ready to be
pasted).

My second guess is that you went through the Tools|macro|macros dialog.
That's
enough to kill the clipboard. Maybe you could use the same
tools|macro|macro|options to assign a shortcut key.

My third guess is that your receiving worksheet is protected.



jack wrote:

For macro:
Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

I receive error message:
Run time error '1004':
Pastespecial method of Range class failed

What have I done wrong?

"Dave Peterson" wrote in message
...
If you're doing the .copy in code:

Option Explicit
Sub Macro3A()
Range("B6:H6").Copy
Worksheets("sheet2").Select
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

If you've already copied the range and want to paste to the activecell
(you
already changed to the other sheet manually):

Option Explicit
Sub Macro3A()
ActiveCell.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub

jack wrote:

How do I change the first three lines of the macro below so that the
paste
special statement will execute to the active cell of a separate
worksheet
after making the manual copy selection ?

Sub Macro3()
Range("B6:H6").Select
Selection.Copy
Range("L6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
End Sub

--

Dave Peterson


--

Dave Peterson



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
Cut & Paste Need Special Macro Miss Kitty[_2_] Excel Discussion (Misc queries) 6 August 25th 08 09:12 PM
PASTE SPECIAL w/ Macro Jase Excel Discussion (Misc queries) 7 February 26th 08 06:06 PM
Cut and Paste using Macro gives paste special method error Lourens Pentz Excel Programming 3 November 21st 04 10:42 PM
Dynamic Copy/Paste Special Formulas/Paste Special Values Sharon Perez Excel Programming 3 August 7th 04 09:49 PM
Macro/Paste Special steve Excel Programming 0 August 14th 03 11:45 PM


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