Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default copy area on spreadhseet as picutre

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default copy area on spreadhseet as picutre

What is the error? Are you sure the chart name is "Chart 1"..Try running this
in Step Into mode (F8)

If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default copy area on spreadhseet as picutre

Oops..I misread..To copy a range the below should do

Sub Macro()
Sheets("summary").Range("b2:e142").Copy _
Sheets("EXPORTsmry").Range("b2")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

What is the error? Are you sure the chart name is "Chart 1"..Try running this
in Step Into mode (F8)

If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default copy area on spreadhseet as picutre

the reason i was trying to copy and paste as a picture is that data in the
range is subject to change, and i have a macro that goes through the original
page and hides the blank rows, and i want to maintain that formattting when i
copy and paste the range... is there a way to do that?
--
Thanks,

Galen


"Jacob Skaria" wrote:

Oops..I misread..To copy a range the below should do

Sub Macro()
Sheets("summary").Range("b2:e142").Copy _
Sheets("EXPORTsmry").Range("b2")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

What is the error? Are you sure the chart name is "Chart 1"..Try running this
in Step Into mode (F8)

If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default copy area on spreadhseet as picutre

The below method copy the formats too.If you mean copy only the formats...

Sheets("summary").Range("b2:e142").Copy
Sheets("EXPORTsmry").Range("b2").PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False


If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

the reason i was trying to copy and paste as a picture is that data in the
range is subject to change, and i have a macro that goes through the original
page and hides the blank rows, and i want to maintain that formattting when i
copy and paste the range... is there a way to do that?
--
Thanks,

Galen


"Jacob Skaria" wrote:

Oops..I misread..To copy a range the below should do

Sub Macro()
Sheets("summary").Range("b2:e142").Copy _
Sheets("EXPORTsmry").Range("b2")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

What is the error? Are you sure the chart name is "Chart 1"..Try running this
in Step Into mode (F8)

If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default copy area on spreadhseet as picutre

thanks for your help
--
Thanks,

Galen


"Jacob Skaria" wrote:

The below method copy the formats too.If you mean copy only the formats...

Sheets("summary").Range("b2:e142").Copy
Sheets("EXPORTsmry").Range("b2").PasteSpecial Paste:=xlPasteFormats, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False


If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

the reason i was trying to copy and paste as a picture is that data in the
range is subject to change, and i have a macro that goes through the original
page and hides the blank rows, and i want to maintain that formattting when i
copy and paste the range... is there a way to do that?
--
Thanks,

Galen


"Jacob Skaria" wrote:

Oops..I misread..To copy a range the below should do

Sub Macro()
Sheets("summary").Range("b2:e142").Copy _
Sheets("EXPORTsmry").Range("b2")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

What is the error? Are you sure the chart name is "Chart 1"..Try running this
in Step Into mode (F8)

If this post helps click Yes
---------------
Jacob Skaria


"Galen" wrote:

Sub test8()

Sheets("summary").Select
Range("b2:e142").Select
Selection.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORTsmry").Select
Range("b2").Select
ActiveSheet.Paste


End Sub

this is the code i have, it is something that i found on here, and adapted
for some charts... it works for the charts in this format (below):

Sub test2()

Sheets("duration chart").Select
Sheets("duration Chart").ChartObjects("Chart 1").Select
ActiveChart.CopyPicture _
Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Sheets("EXPORT").Select
Range("b49").Select
ActiveSheet.Paste


End Sub

but when i tried to adapt it to copy a specific range (code at top) i get
an error... any help would be greatly appreciated

--
Thanks,

Galen

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
Use of macros on spreadhseet copies Wayne Excel Discussion (Misc queries) 1 September 3rd 08 04:15 PM
Greyed out area on the spreadhseet zen Excel Discussion (Misc queries) 4 June 19th 08 08:31 PM
error: "the copy area & the paste area are not the same size & sh Janis Excel Discussion (Misc queries) 1 September 7th 07 10:58 PM
Error handler if copy area different from paste area Paul S. Natanson Excel Programming 3 December 5th 06 02:00 AM
how to put the subtotal of the sum and count in one spreadhseet? SM Excel Worksheet Functions 1 February 1st 06 09:01 AM


All times are GMT +1. The time now is 08:48 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"