Thread: Exclude image
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Melanie Breden Melanie Breden is offline
external usenet poster
 
Posts: 88
Default Exclude image

Hi,

The following code copies and pastes a data range "appendix" to a sheet "contract". How do i amend so that the images within
this range do not copy....only the data (text) does???


try this:

Private Sub CommandButton1_Click()
Dim rngSource As Range
Dim rngFind As Range

Set rngSource = Worksheets("quote2").Range("appendix")
Set rngFind = Worksheets("contract").Cells.Find( _
What:="appendix1.0", After:=ActiveCell, _
LookIn:=xlFormulas, LookAt:=xlPart)

If Not rngFind Is Nothing Then
Application.Goto rngFind.Offset(2, 0)
Selection.Resize(rngSource.Rows.Count, 1).EntireRow.Insert
Selection.Resize(rngSource.Rows.Count, rngSource.Columns.Count).Value = rngSource.Value
End If
End Sub

--
Regards
Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)