Makro läuft nicht
16.11.2003 19:39:42
Mike
habe ein Makro erhalten, das auf meinem Home-PC prima läuft (Windows XP Prof. und Office XP). Auf meinem Büro-PC läuft es aber nicht. Dort ist Windows NT und Excel 97 installiert. Was kann die Ursache sein? Das Makro lautet:
Private Sub Workbook_Open()
Dim txt
Dim x As Currency
On Error Resume Next
Columns("A:E").Interior.ColorIndex = xlNone
txt = InputBox("Bitte geben Sie einen Bruttobetrag in Euro ein:", "Besondere Monats-Lohnsteuertabelle")
If IsNumeric(txt) = False Then Exit Sub
x = txt
For i = Cells(65536, 1).End(xlUp).Row To 1 Step -1
If x >= Cells(i, 1) And Cells(i, 1) <> "" Then
Range(Cells(i, 1), Cells(i, 5)).Interior.Color = RGB(255, 255, 0)
Cells(i, 1).Select
' hier müßte der Code hin in der art für Spalte C =3
Workbooks("Trennungsgeld.xls").Worksheets("Trennungsgeld").Range("J12") = Cells(i, 3)
Workbooks("Trennungsgeld.xls").Worksheets("Trennungsgeld").Range("J13") = Cells(i, 4)
Workbooks("Trennungsgeld.xls").Worksheets("Trennungsgeld").Range("J14") = Cells(i, 5)
Exit Sub
End If
Next
End Sub
Gruß
Mike