Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/06/2010, 07:37
pana99
 
Fecha de Ingreso: enero-2007
Ubicación: 9 de julio
Mensajes: 111
Antigüedad: 17 años, 3 meses
Puntos: 2
Respuesta: insertar hojas en un libro excel

Hola.
Aca te paso un codigo que saque de algun lado y que te va a permitir insertar una imagen y manipularla
Tendras que modificarla para que lo haga en la hoja que vos quieras
Espero te ayude

Código:
Sub TestInsertPicture()
    InsertPicture "C:\TuImagen.jpg", Range("D10"), True, True
End Sub

Sub InsertPicture(PictureFileName As String, TargetCell As Range, _
    CenterH As Boolean, CenterV As Boolean)
' inserts a picture at the top left position of TargetCell
' the picture can be centered horizontally and/or vertically
Dim p As Object, t As Double, l As Double, w As Double, h As Double
    If TypeName(ActiveSheet) <> "Worksheet" Then Exit Sub
    If Dir(PictureFileName) = "" Then Exit Sub
    ' import picture
    Set p = ActiveSheet.Pictures.Insert(PictureFileName)
    ' determine positions
    With TargetCell
        t = .Top
        l = .Left
        If CenterH Then
            w = .Offset(0, 1).Left - .Left
            l = l + w / 2 - p.Width / 2
            If l < 1 Then l = 1
        End If
        If CenterV Then
            h = .Offset(1, 0).Top - .Top
            t = t + h / 2 - p.Height / 2
            If t < 1 Then t = 1
        End If
    End With
    ' position picture
    With p
        .Top = t
        .Left = l
    End With
    Set p = Nothing
End Sub