ist es möglich einen Text im Status Bar zu zentrieren und wenn, ja wie?
Danke und Gruß Martin
Option Explicit
Sub MyStatusbar()
Dim myTxt$, WDH&
On Error GoTo Fehler
WDH = InputBox("Leerzeichenmultplikator für Leerzeichenwiederholung in Länge des Strings")
myTxt = "Das ist mein Text"
If Not IsNumeric(WDH) Then Exit Sub
If (WDH * Len(myTxt)) + (Len(myTxt)) > 255 Then
MsgBox "Zeichelänge zu groß! >=255", vbCritical, " Limit ..."
Application.StatusBar = False
Exit Sub
Else
Application.StatusBar = Application.WorksheetFunction.Rept(" ", WDH * Len(myTxt)) & myTxt
Debug.Print (WDH * Len(myTxt)) + (Len(myTxt)) 'Optional
End If
Exit Sub
Fehler:
Application.StatusBar = False
End Sub
Gruß Matthias