View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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