online 1
gast (50)

/ Forum / Tabellenkalkulation

TabellenkalkulationTabellenkalkulation

Fragevon Oli00 vom 23.03.2019, 10:40 Options

VBA: Eine Variable in einem String

Hallo,

weiß jemand ob etwa folgendes (was im Code fett markiert ist) möglich ist:

Dim bilder As Shape
Dim alle_bilder(100)


counter = 0

For Each bilder In ActiveSheet.Shapes

If bilder.name = "*box*"
If counter = 0 Then
alle_bilder(1) = bilder.Name
counter = 1
Else
counter = counter + 1
alle_bilder(counter) = bilder.Name
End If
End If
Next bilder

Grüße

Oli


Antwort schreiben

Antwort 1 von $m$s vom 23.03.2019, 10:52 Options

Hallo Oli

Ich würds so versuchen:

If instr(bilder.Name,"box")>1 then .....

Antwort 2 von Oli00 vom 23.03.2019, 10:55 Options

Stimmt, das ist auf jeden Fall eine Möglichkeit!

Danke für deine Hilfe!

Ähnliche Themen

PHP - Ersten Buchstaben eines Strings nach Variable
JoFi-Ha  29.05.2007 - 73 Hits - 2 Antworten

VBA Verdeklaration und Übergabe
Booyeoo  18.06.2007 - 79 Hits - 3 Antworten

Variable wird nicht erkannt
lothar48  12.07.2007 - 19 Hits - 4 Antworten

Variable durchsuchen
Uesch  25.02.2008 - 34 Hits - 7 Antworten

VB6 Variable in anderen Sub übergeben
da_horscht  28.11.2009 - 99 Hits - 6 Antworten

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026