elvagonumero1
New Member
- Joined
- Apr 24, 2012
- Messages
- 15
Hello,
Maybe this question would be solved if I get to the basics, but I'm used to find quick answers checking forums. This one may seam silly, but I was looking and didn't found something that could help me on this.
The whole code is based on Brian Baulsom's showed on http://www.mrexcel.com/forum/excel-questions/344789-copying-embedded-images-directory.html
I'm using excel 2010
The highlighted row fires an error and I don't know why, I've already tried some alternatives but nothing did work.
I'd be glad to be enlightened... Thanks in advance
Elvagonumero1
Maybe this question would be solved if I get to the basics, but I'm used to find quick answers checking forums. This one may seam silly, but I was looking and didn't found something that could help me on this.
The whole code is based on Brian Baulsom's showed on http://www.mrexcel.com/forum/excel-questions/344789-copying-embedded-images-directory.html
I'm using excel 2010
Code:
Private Sub lblImprimirJPG_Click() 'Exporting the selected range as an image to mspaint
Dim MiImagen As object 'copied selection that I want to paste into mspaint
Dim AltoI As Integer ' original picture height
Dim AnchoI As Integer ' original picture width
Dim RutaNombreArchivo As String 'fullname of the file
Dim NombreArchivo As String 'the basic name of the file
Sheets("FormatoEntrega").Select 'the sheet where the range is going to be copied
ActiveWindow.View = xlNormalView
[COLOR=#ff0000] MiImagen = Sheets("FormatoEntrega").Range("A1:Z59").copy[/COLOR]
AltoI = Int(MiImagen.Height * 1.333) '1.333 is the point to pixel ratio
AnchoI = Int(MiImagen.Width * 1.333)
NombreArchivo = Sheets("FormatoEntrega").Range("v4") & ".jpg"
RutaNombreArchivo = ThisWorkbook.Path & "\SOPORTES\" & NombreArchivo
'After this comes the routine that pastes and manipulates mspaint and works beatifully
Exit Sub
The highlighted row fires an error and I don't know why, I've already tried some alternatives but nothing did work.
I'd be glad to be enlightened... Thanks in advance
Elvagonumero1
Last edited: