PC Review


Reply
Thread Tools Rate Thread

copy area on spreadhseet as picutre

 
 
Galen
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
Galen
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
Galen
Guest
Posts: n/a
 
      24th Aug 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Greyed out area on the spreadhseet zen Microsoft Excel Misc 3 19th Jun 2008 08:31 PM
error: "the copy area & the paste area are not the same size & sh =?Utf-8?B?SmFuaXM=?= Microsoft Excel Misc 1 7th Sep 2007 10:58 PM
Re: Error handler if copy area different from paste area NickHK Microsoft Excel Programming 2 5th Dec 2006 02:00 AM
Picutre It 9 =?Utf-8?B?SmVmZg==?= Windows XP Photos 3 12th Sep 2005 11:01 PM
MS Picutre and Fax Viewer Frank Windows XP Photos 1 29th Apr 2004 06:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:12 AM.