Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Excel/VB Copy/Paste of Graphics

Have you thought about copying the worksheet (not the cells) instead. Then
going back and cleaning up the ranges you don't want?

Option Explicit

Sub testme()

Dim myShape As Shape
Dim myRng As Range
Dim fWks As Worksheet
Dim tWks As Worksheet

Set fWks = ActiveSheet
Set tWks = Sheets.Add
'copy the ranges you want.
With fWks
Set myRng = .Range("b1:b99")

For Each myShape In .Shapes
If Intersect(myRng, myShape.TopLeftCell) Is Nothing Then
'do nothing
Else
myShape.Copy
Application.Goto tWks.Range(myShape.TopLeftCell.Address)
tWks.Paste
End If
Next myShape
End With

End Sub




JimK wrote:

Hi,
I've written a macro that copy/pastes values, formats and column widths to a
new output worksheet. Basically, it takes the selected range from the source
workbook and copy/pastes it to an output workbook. However, the source
worksheet has several graphics in the worksheet (along with the data). My
macro is copy/pasting the data and formats just fine, but it is not
"catching" the graphics (I assume because these aren't "in" the worksheet but
rather "on top" of the cells). Is their an easy way to program the macro to
pick up graphics inside the selected range (and more specifically pick up
graphics but not command buttons, since both are in the selected range)?
Thanks in advance for your time.


--

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
Can't Copy and Paste or Paste Special between Excel Workbooks wllee Excel Discussion (Misc queries) 5 April 29th 23 03:43 AM
Excel copy + paste Balee Excel Worksheet Functions 1 January 21st 10 09:53 PM
Copy and paste from Excel JohnF Excel Discussion (Misc queries) 7 April 13th 08 09:56 PM
make it easy to turn off the little paste option graphics devinmckinney Excel Worksheet Functions 1 May 24th 06 08:40 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM


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

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"