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.
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.
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
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.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks