Habe eine Variable TabName mit exakt dem Inhalt
"Tabelle1", "Tabelle2", "Tabelle3"
Der Befehl Sheets(Array(TabName)).Select soll diese nun markieren
Ist wohl ein Anfängerfehler mit der Syntax. Suche schon länger im Forum.
Bitte um Tip.
Eric
Habe eine Variable TabName mit exakt dem Inhalt
"Tabelle1", "Tabelle2", "Tabelle3"
Der Befehl Sheets(Array(TabName)).Select soll diese nun markieren
Ist wohl ein Anfängerfehler mit der Syntax. Suche schon länger im Forum.
Bitte um Tip.
Eric
Dim varTab(2) As Variant
varTab(0) = "Tabelle1"
varTab(1) = "Tabelle2"
varTab(2) = "Tabelle3"
Sheets(varTab).Select
Bye
Nike
es geht auch so:
tabname = Array("Tabelle1", "Tabelle2", "Tabelle3")
Sheets(tabname).Select
Gruß Coach
Hier mein hello world Entwurf
Sub Tabellen_Markieren()
anzahl = Sheets.Count
For x = 1 To anzahl
If Mid$(Sheets(x).Name, 2, 1) = "a" Then
TabMARK = TabMARK & Sheets(x).Name
End If
If x < 3 Then
TabMARK = TabMARK & ", "
End If
Next
MsgBox TabMARK
TabMARK_Arr = Array(TabMARK)
Sheets(TabMARK_Arr).Select
End Sub
-------
Hab es auch noch mit & chr$(34) usw. probiert. Ich bekomme den erstellten String nicht in die sheet().select Anweisung.
Viele Grüße
Eric
Bye
Nike
es funktioniert super, auch wenn ich den UBound und Preserve etc. nicht verstehe.
Merci
Eric