Wieso kein Focus
04.01.2006 15:31:28
Walter
habe folgendes Problem:
Ich rufe eine UF auf kommt allerdings kein Focus auf die Textbox1, Wieso ?
In der Aktivierungszeile steht ebenfalls die Textbox1 an 1.
Hier mein UF Makro:
Private Sub UserForm_Initialize()
On Error Resume Next
ActiveCell.Offset(0, 2) = "" 'Center rausnehmen
ActiveCell.Offset(0, 0).Select
ActiveCell.Offset(0, 4) = "00 000 00000"
ActiveCell.Offset(0, -4).Select
TextBox3 = Format(ActiveCell.Offset(0, 4), ("00 000 00000"))
ActiveCell.Offset(0, 12) = 0
ActiveCell.Offset(0, -12).Select
TextBox9 = Format(ActiveCell.Offset(0, 12).Value, ("#,##0.00"))
TextBox4 = Format("ww")
TextBox5 = Format("mb")
TextBox6 = Format("0000")
TextBox8 = Format("dd.mm.yyyy")
ActiveCell.Offset(0, 11) = ""
ActiveCell.Offset(0, -11).Select
TextBox1.SetFocus
With TextBox1
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios _
:=True, Password:="bb"
End Sub
Gruß Walter