In Excel 03 a simple command for pasting values and formats was included. In Exel 07 is its missing. Only a paste values button is available on the tool bar or custom list.
So I tried to create a simple macro to paste formats and values using paste special after selecting my range.
I successfully did for for a macro that pastes values and formats and transposes.
But the very same macro without transposing does not work. Can't figure out why.
Both macros are below. After the second macro, the error message I get is shown.
Can someone out there help this macro amateur understand why I can figure out something this simple?
Doug
Sub PasteValuesDown()
'
' PasteValuesDown Macro
' Macro recorded 3/16/2008 by Unknown
'
' Keyboard Shortcut: Ctrl+m
'
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, transpose:=True
End Sub
------------------------------------------------------------------------
Sub pastevaluesformats()
'
' pastevaluesformats Macro
'
' Keyboard Shortcut: Ctrl+Shift+F
'
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, transpose:=False
End Sub
--------
Run time error 1004
Paste Special method range failed
So I tried to create a simple macro to paste formats and values using paste special after selecting my range.
I successfully did for for a macro that pastes values and formats and transposes.
But the very same macro without transposing does not work. Can't figure out why.
Both macros are below. After the second macro, the error message I get is shown.
Can someone out there help this macro amateur understand why I can figure out something this simple?
Doug
Sub PasteValuesDown()
'
' PasteValuesDown Macro
' Macro recorded 3/16/2008 by Unknown
'
' Keyboard Shortcut: Ctrl+m
'
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, transpose:=True
End Sub
------------------------------------------------------------------------
Sub pastevaluesformats()
'
' pastevaluesformats Macro
'
' Keyboard Shortcut: Ctrl+Shift+F
'
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, transpose:=False
End Sub
--------
Run time error 1004
Paste Special method range failed