border

Miembros:
Mensajes:
Temas:
Online:

Ultimo Miembro:

 
 

  #1 (permalink)  
Antiguo 07-12-2006, 20:20:15
Un Nuevo Amigo
 
Registrado: dic 2006
Posts: 1
sosalbfvz Valoración +2
Predeterminado Imagenes Insertadas en Excel con codigo VB

Buenas Tardes, necesito ayuda con respecto a borrar una imagen que inserto con codigo VB en Excel, anexo parte del codigo:

Sub V4E()
'
Dim DataPath As String
Dim PicturePath As String


'Import the data
DataPath = "C:\Documents and Settings\sosal\Escritorio\templates\" + Hoja1.ComboBox1 + ".dat"
PicturePath = "C:\Documents and Settings\sosal\Escritorio\templates\" + Hoja1.ComboBox1 + ".wmf"

'Imports the image
Range("A35").Select
Sheets(1).Pictures.Insert(PicturePath).Select

'Position the image
Sheets(1).DrawingObjects(1).Left = 5
Sheets(1).DrawingObjects(1).Top = 275

'Image is passed in ClipBoard as Exteneded MetaFile
' Width and Height need to be in points (1/72in) so:

Selection.ShapeRange.ScaleWidth 1.05, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.22, msoFalse, msoScaleFromTopLeft

End Sub



Necesito ahora una rutina que me borre la imagen anterior en caso de que selecione otra en el Combo!!!!
Intente con un macro pero cuando me genera la imagen me coloca una denominacion a la imagen aleatoria ejemplo:


ActiveSheet.Shapes("Picture 179").Select
Selection.Delete


Como podria selecionarla y borrarla?????


Gracias por su ayuda
Responder Con Cita
  #2 (permalink)  
Antiguo 14-12-2006, 01:43:17
Avatar de ST
ST ST is offline
Un Nuevo Amigo
 
Registrado: dic 2006
Posts: 14
ST Valoración +2
Predeterminado

para insertar imagenes en excel yo lo hago asi

insertar imagenes

espero no infringir alguna regla :smt004
__________________
Salu2 ST
Responder Con Cita
Respuesta


Herramientas
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Trackbacks are habilitado
Pingbacks are habilitado
Refbacks are habilitado


Temas Similares
Tema Autor Foro Respuestas Último Mensaje
INSERTAR UNA FILA COMPLETA EN EXCEL POR CODIGO DIVEMASTER2002 VBA (Excel, Word, Outlook, Access) 3 28-05-2007 01:50:34
imagenes armando Visual Basic 6.00 2 24-04-2007 23:05:13
Código para cerrar excel... granada-pepe VBA (Excel, Word, Outlook, Access) 2 28-04-2006 21:31:42
codigo para insertar otra hoja de excel en el mismo libro Arturo Vidal 77 VBA (Excel, Word, Outlook, Access) 1 23-04-2006 09:35:20
Mover datos VB 6 a Excel 2000 y Gráficos de Excel a VB 6 symotom Visual Basic 6.00 2 20-03-1970 07:42:36


La franja horaria es GMT. Ahora son las 19:28:06.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
A vBSkinworks Design

Alojado en el servicio Premium de Masquewebs | Diseño mejorado por MasqueWebs

right