P
Patrick
What I am trying to do, is to copy a spreadsheet from one Excel “window†and
paste it into a new “windowâ€. But when I paste this, I need it to paste it as
a picture, or "Picture (Enhanced Metafile)." When I run this macro I get a
run time error '1004.' How can do this?
Macro:
' Select area
Range("A4:I46").Select
Selection.Copy
' Open new EXCEL SHEET
'
' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("C:\Program Files\Microsoft
Office\OFFICE11\EXCEL.EXE", 1)
' Application.Wait (Now + TimeValue("0:00:03"))
'
' Paste IU as picture so that the format is not changed and still contains
boxes
'
'Sheets("Sheet1").Select
Range("A1").Select
'ActiveSheet.Paste
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False
How can I run a macro between two separate excel windows?
paste it into a new “windowâ€. But when I paste this, I need it to paste it as
a picture, or "Picture (Enhanced Metafile)." When I run this macro I get a
run time error '1004.' How can do this?
Macro:
' Select area
Range("A4:I46").Select
Selection.Copy
' Open new EXCEL SHEET
'
' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("C:\Program Files\Microsoft
Office\OFFICE11\EXCEL.EXE", 1)
' Application.Wait (Now + TimeValue("0:00:03"))
'
' Paste IU as picture so that the format is not changed and still contains
boxes
'
'Sheets("Sheet1").Select
Range("A1").Select
'ActiveSheet.Paste
ActiveSheet.PasteSpecial Format:="Picture (Enhanced Metafile)",
Link:=False _
, DisplayAsIcon:=False
How can I run a macro between two separate excel windows?