Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Excel copy + paste | Excel Worksheet Functions | |||
Copy and paste from Excel | Excel Discussion (Misc queries) | |||
make it easy to turn off the little paste option graphics | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) |