Live-Forum - Die aktuellen Beiträge
Datum
Titel
24.04.2024 19:29:30
24.04.2024 18:49:56
Anzeige
Archiv - Navigation
668to672
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
668to672
668to672
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

geht das auch in excel 97

geht das auch in excel 97
23.09.2005 15: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

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

Betreff
Datum
Anwender
Anzeige
AW: geht das auch in excel 97
23.09.2005 20: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 11: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

Links zu Excel-Dialogen

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige