18. April 2016 11:32
Sheet.Shapes.AddShape(1, 1,1,50,40).Fill.UserPicture(Bilder);
18. April 2016 13:16
Sub Bild_einfügen()
ActiveSheet.Unprotect Password:="DeinPasswort"
Dim Dat As String
Dim Zelle As Range
Dim ScaleA As Double
Set Zelle = Range("B10") 'hier wird das bild eingefügt
Dat = Application.GetOpenFilename(, , "Bild auswählen", , False)
Select Case Right(Dat, 3)
Case "bmp", "jpg", "tif", "gif"
ActiveSheet.Pictures.Insert(Dat).Select
With Selection.ShapeRange
.Top = Zelle.Top
.Left = Zelle.Left
ScaleA = WorksheetFunction.Min(Zelle.Width / .Width, Zelle.Height / .Height)
.Height = .Height * ScaleA
End With
Selection.Placement = xlMoveAndSize
Selection.PrintObject = True
Case Else
MsgBox "Sie haben kein gültiges Bild ausgewählt"
End Select
ActiveSheet.Protect Password:="DeinPasswort"
End Sub
9. Mai 2016 09:06
xlRange.RowHeight := 50;
EVALUATE(PosX, FORMAT(xlRange.Left));
EVALUATE(PosY, FORMAT(xlRange.Top));
xlShape:=Sheet.Shapes.AddPicture('C:\Artikelbilder\'+
"No."+'.bmp',1, 1,PosX + 5,PosY + 5,50,50);
xlShape.Select;
xlShape.Placement(1);
MODIFY;