Problem mit kleiner IF Routine
Jenny
ich habe folgendes Macro das später noch ausgebaut werden soll und daher mit einem Passwort geschützt ist.
Könnt Ihr mir sagen, wie ich meinen Code ergänzen muss, damit zusätzlich noch folgendes geschieht ? :-)
1) Klickt man in der Input Box auf Cancel soll gar keine Message Box erscheinen.
2) Sowohl die Input Box als auch die Message Box sollten sich nach 5 Sekunden ohne Eingabe bzw. Aktion automatisch schließen.
Sub DataCleanup()
If InputBox("Admin macro started - enter password to proceed") "*" Then
MsgBox "Wrong password - please contact the administrator !"
Exit Sub
End If
With ActiveWorkbook.Worksheets("Database")
.Rows("2:1000").Sort _
Key1:=.Range("I2"), Key2:=.Range("A2"), Key3:=.Range("B2"), _
Order1:=xlAscending, Order2:=xlAscending, Order3:=xlAscending, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:=xlSortNormal, Header: _
=xlNo
.Columns("A:I").WrapText = True
Application.Goto .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0)
End With
End Sub
LG und vielen Dank Euch im Voraus, Jenny