ich habe ein Tabellenblatt mit fünf Textboxen und einem Image. Dieses Blatt wird mit einem PDF-Objekt gefüllt, sodaß Textboxen und Image im Hintergrund verschwinden.
Gibt es die Möglichkeit, diese Textboxen und das Image mit VBA sozusagen auf das PDF-Objekt zu setzen ?
Vielen Dank im Voraus
Hier noch mein Code :
Private Sub CommandButton1_Click()
Dim Zeile As Long, Spalte As Long, objShape As Shape
Dim Zelle As Range
Dim sFilename As String
sFilename = "C:\AAA_Garantie\Garantie.pdf" 'Beispiel
Zeile = 1
Spalte = 1
Set Zelle = Cells(Zeile, Spalte)
Zelle.Select
Tabelle1.OLEObjects.Add Filename:=sFilename, _
Link:=True, _
DisplayAsIcon:=False
With ActiveSheet
Set objShape = .Shapes(.Shapes.Count)
End With
With objShape
.LockAspectRatio = msoFalse
.Top = Zelle.Top '+ 2
.Left = Zelle.Left '+ 2
.Width = Application.CentimetersToPoints(18.55)
.Height = Application.CentimetersToPoints(29.21)
End With
End Sub
Private Sub CommandButton2_Click()
With Sheets("Tabelle1").Label1
.Caption = "Name & Vorname"
.Top = 220
.Left = 70
.Height = 14
.Width = 150
.BorderStyle = 0
.BackStyle = 0
.Font.Size = 12
.Font.Bold = True
End With
With Sheets("Tabelle1").Label2
.Caption = "Straße & Haus-Nr."
.Top = 246
.Left = 70
.Height = 14
.Width = 150
.BorderStyle = 0
.BackStyle = 0
.Font.Size = 12
.Font.Bold = True
End With
With Sheets("Tabelle1").Label3
.Caption = "Stadt"
.Top = 220
.Left = 285
.Height = 14
.Width = 150
.BorderStyle = 0
.BackStyle = 0
.Font.Size = 12
.Font.Bold = True
End With
With Sheets("Tabelle1").Label4
.Caption = "PLZ"
.Top = 246
.Left = 285
.Height = 14
.Width = 70
.BorderStyle = 0
.BackStyle = 0
.Font.Size = 12
.Font.Bold = True
End With
With Sheets("Tabelle1").Label5
.Caption = "Bundesland"
.Top = 246
.Left = 370
.Height = 14
.Width = 70
.BorderStyle = 0
.BackStyle = 0
.Font.Size = 12
.Font.Bold = True
End With
With Sheets("Tabelle1").Image1
.Top = 105
.Left = 345
.BorderStyle = 0
.BackStyle = 0
End With
End Sub