Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

geht das auch in excel 97

Forumthread: geht das auch in excel 97

geht das auch in excel 97
23.09.2005 17:58:15
Basti
Hallo, hätte mal eine simple Frage. Die IF ... ELSE ... END IF verschachtelung
im folgenden Code, funktioniert diese Verschachtelung so wie in diesem Code auch in Excel 97 ?

Private Sub CommandButton3_Click()
Dim s, t As Range
Set s = Range("b:b").Find(UserForm4.Caption)
Set t = [b500].End(xlUp).Offset(1, 0)
If s.Offset(1, 0).Font.ColorIndex = 10 Then
''wenn schon eine Ressource eingetragen ist
Else 'wenn noch keine Ressource eingetragen wurde
If s.Offset(3, 0).Font.ColorIndex = 3 Or s.Offset(3, 0).Font.ColorIndex = 5 Then
s.End(xlDown).Offset(-2, 0).Select
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Font.ColorIndex = 10
ActiveCell.Value = "R.:" & TextBox1.Value
ActiveCell.Font.Italic = True
ActiveCell.Font.Bold = False
ActiveCell.Font.Size = 10
ActiveCell.Offset(0, 1).Value = "-"
ActiveCell.Offset(0, 2).Value = "-"
Else
If s.Offset(1, 0).Value <> "" Then
s.End(xlDown).Select
ActiveCell.EntireRow.Insert
ActiveCell.EntireRow.Font.ColorIndex = 10
ActiveCell.Value = "R.:" & TextBox1.Value
ActiveCell.Font.Italic = True
ActiveCell.Font.Bold = False
ActiveCell.Font.Size = 10
ActiveCell.Offset(0, 1).Value = "-"
ActiveCell.Offset(0, 2).Value = "-"
Else
If s = t Then
s.Offset(1, 0).Select
ActiveCell.Value = "R.:" & TextBox1.Value
ActiveCell.Font.ColorIndex = 10
ActiveCell.Font.Italic = True
ActiveCell.Font.Bold = False
ActiveCell.Font.Size = 10
Else
s.Offset(1, 0).Select
ActiveCell.Value = "R.:" & TextBox1.Value
ActiveCell.Font.ColorIndex = 10
ActiveCell.Font.Italic = True
ActiveCell.Font.Bold = False
ActiveCell.Font.Size = 10
End If
End If
End If
End If
End Sub

Gruß Basti
Anzeige

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: geht das auch in excel 97
23.09.2005 22:21:47
Ramses
Hallo
mal eine simple Rückfrage:
Hast du es schon mal probiert '
Gruss Rainer
AW: geht das auch in excel 97
24.09.2005 13:18:37
Basti
Hallo Ramses,
nein ich habe es noch nicht probiert, mein Problem ist das ich das Programm zu Hause schreibe (Excel 2003) und nachher auf Arbeit anwenden möchte (Excel 97).
Natürlich werde ich es auf Arbeit früher oder (eher) später testen.
Gruß Basti
Anzeige
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18