Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for one-click paste special transpose
I would like to write a macro to assign to a toolbar button. I would like it
to Paste_Special Transpose in the active cell. Seems simple enough, but I keep failing. Thanks for any help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for one-click paste special transpose
Maybe...
Option Explicit Sub testme() On Error Resume Next ActiveCell.PasteSpecial Transpose:=True If Err.Number < 0 Then MsgBox "Something bad happened!" Err.Clear End If On Error GoTo 0 End Sub Lots of things can go wrong--nothing currently copied, the paste won't fit, ... So I just let it fail and issue a warning. Victoria @ WB wrote: I would like to write a macro to assign to a toolbar button. I would like it to Paste_Special Transpose in the active cell. Seems simple enough, but I keep failing. Thanks for any help. -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for one-click paste special transpose
It worked. Thanks.
"Dave Peterson" wrote: Maybe... Option Explicit Sub testme() On Error Resume Next ActiveCell.PasteSpecial Transpose:=True If Err.Number < 0 Then MsgBox "Something bad happened!" Err.Clear End If On Error GoTo 0 End Sub Lots of things can go wrong--nothing currently copied, the paste won't fit, ... So I just let it fail and issue a warning. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro for one-click paste special transpose
You're welcome.
Victoria @ WB wrote: It worked. Thanks. "Dave Peterson" wrote: Maybe... Option Explicit Sub testme() On Error Resume Next ActiveCell.PasteSpecial Transpose:=True If Err.Number < 0 Then MsgBox "Something bad happened!" Err.Clear End If On Error GoTo 0 End Sub Lots of things can go wrong--nothing currently copied, the paste won't fit, ... So I just let it fail and issue a warning. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create a copy/paste special/transpose macro? | Excel Discussion (Misc queries) | |||
Paste Special / transpose | Excel Discussion (Misc queries) | |||
When I special paste and transpose.... | New Users to Excel | |||
Paste Special Transpose | Excel Programming | |||
Need help with Transpose paste special | Excel Programming |