Private
Sub
ButtonBild_Click()
Dim
bytBild
As
Byte
Dim
arrBereiche()
arrBereiche = Array(
"B10:I23"
,
"B25:I38"
,
"K10:R23"
,
"K25:R38"
)
Application.ScreenUpdating =
False
With
Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect =
True
.InitialFileName =
"G:\..."
.ButtonName =
"OK"
.Title =
"Bilderauswahl"
.Show
If
.SelectedItems.Count < 5
Then
For
bytBild = 1
To
.SelectedItems.Count
strBild = .SelectedItems(bytBild)
With
ActiveSheet.Shapes.AddPicture(Filename:=strBild, LinkToFile:=msoFalse, _
SaveWithDocument:=msoTrue, Left:=0, Top:=0, _
Width:=Range(arrBereiche(bytBild - 1)).Width, _
Height:=Range(arrBereiche(bytBild - 1)).Height)
.Top = Range(arrBereiche(bytBild - 1)).Top
.Left = Range(arrBereiche(bytBild - 1)).Left
End
With
Next
bytBild
Else
End
If
End
With
Application.ScreenUpdating =
True
End
Sub