Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Überprüfung des Datenformates der Zwischenablage

Forumthread: Überprüfung des Datenformates der Zwischenablage

Überprüfung des Datenformates der Zwischenablage
14.05.2024 17:36:21
Dominic_Schweiz
Hallo zusammen, ich hoffe jemand hier aus dem Schwarmbewusstsein kann mir helfen

Ich habe ein Problem, welches mich noch zur Verzweiflung bringt.
Folgendes:
Ich möchte aus der Zwischenablage (SnippingTool) ein Bild einfügen, beim klicken auf eine Schaltfläche. Z.b. in Zelle "A1"
Es soll aber vorher Überprüfen, ob es sich wirklich um ein Bild handelt. Ich bekomme dies einfach nicht hin.
Wenn andere Objekte im Zwischenspeicher sind, verwirrt dies leider Excel.

Die Logik wäre ja ganz einfach ;)
Bei Klick -> Wenn Bild in Zwischenablage/Clipboard, dann in Zelle "A1" einfügen, ansonsten msgBox, "kein Bild in der Zwischenablage"

Vielen Dank für Eure Inputs
Dominic
Anzeige

3
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Überprüfung des Datenformates der Zwischenablage
14.05.2024 17:40:32
Onur
" ein Bild einfügen" ? Meinst du mit der neuen Bildfunktion für Zellen oder einfach so?
AW: Überprüfung des Datenformates der Zwischenablage
14.05.2024 18:10:11
peter
Hallo

If Application.ClipboardFormats(1) = 9 then
'einfügen

Könnte natürlich auch einen anderen Wert haben (.B. 2 für Picture), müsstest Du einfach ausprobieren.


Name Value Description
xlClipboardFormatBIFF 8 Binary Interchange file format for Excel version 2.x
xlClipboardFormatBIFF12 63 Binary Interchange file format 12
xlClipboardFormatBIFF2 18 Binary Interchange file format 2
xlClipboardFormatBIFF3 20 Binary Interchange file format 3
xlClipboardFormatBIFF4 30 Binary Interchange file format 4
xlClipboardFormatBinary 15 Binary format
xlClipboardFormatBitmap 9 Bitmap format
xlClipboardFormatCGM 13 CGM format
xlClipboardFormatCSV 5 CSV format
xlClipboardFormatDIF 4 DIF format
xlClipboardFormatDspText 12 Dsp Text format
xlClipboardFormatEmbeddedObject 21 Embedded Object
xlClipboardFormatEmbedSource 22 Embedded Source
xlClipboardFormatLink 11 Link
xlClipboardFormatLinkSource 23 Link to the source file
xlClipboardFormatLinkSourceDesc 32 Link to the source description
xlClipboardFormatMovie 24 Movie
xlClipboardFormatNative 14 Native
xlClipboardFormatObjectDesc 31 Object description
xlClipboardFormatObjectLink 19 Object link
xlClipboardFormatOwnerLink 17 Link to the owner
xlClipboardFormatPICT 2 Picture
xlClipboardFormatPrintPICT 3 Print picture
xlClipboardFormatRTF 7 RTF format
xlClipboardFormatScreenPICT 29 Screen Picture
xlClipboardFormatStandardFont 28 Standard Font
xlClipboardFormatStandardScale 27 Standard Scale
xlClipboardFormatSYLK 6 SYLK
xlClipboardFormatTable 16 Table
xlClipboardFormatText 0 Text
xlClipboardFormatToolFace 25 Tool Face
xlClipboardFormatToolFacePICT 26 Tool Face Picture
xlClipboardFormatVALU 1 Value
xlClipboardFormatWK1 10 Workbook


Peter
Anzeige
AW: Überprüfung des Datenformates der Zwischenablage
15.05.2024 16:40:43
Dominic_Schweiz
Funktioniert wunderbar... Super Tipp

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige