Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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
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
how to create a copy/paste special/transpose macro? [email protected] Excel Discussion (Misc queries) 6 August 8th 07 06:07 AM
Paste Special / transpose Ron Carr Excel Discussion (Misc queries) 2 February 24th 06 06:13 PM
When I special paste and transpose.... sml New Users to Excel 4 January 12th 06 12:49 AM
Paste Special Transpose Brian Excel Programming 1 August 29th 05 03:43 PM
Need help with Transpose paste special Paul Excel Programming 4 December 5th 04 10:00 PM


All times are GMT +1. The time now is 11:52 PM.

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"