Excel Tipps, Tricks, Test und Meinungen!


Apple-Hardware Digital-Foto Digital-Video Elektronik Notebook PC-Hardware PC-Kauftipps PC-Tuning Linux System Netzwerke Novell Windows 2000 Windows 95 Windows 98 Windows ME Windows NT Windows Vista Windows XP Access Apple-Software Backoffice CAD/CAM Corel Excel Linux Lotus PC-Grafik PC-Software Photoshop Powerpoint SQL Star-Office Word ASP C (K&R) C# -.Net C++ Delphi Dreamwaver Flash HTML/CSS Internet Java JavaScript PHP Perl Visual-Basic Webdesign XML Handy / Co. Klassik Computer PC-Allgemein Pocket-PC Sicherheit/Viren Onlinegaming PC-Games Spielekonsolen IE / Outlook NN / Mozilla Opera Fitness Gesundheit Mountainbike Car-HiFi Kfz-Allgemein Kfz-Tuning Motorrad Bücher Haustiere Heimwerken Job Musik Musikprod. Reisen Studium TV / Kino Unterhaltungselektronik
Google-Anzeigen


Hilfe zum Thema: Excel
VBA Kode funktioniert nicht
excel version 2002 und 2003
kann mir jemand bitte sagen, wieso dieser kode nicht funtkioniert habe alles versucht
Application.EnableEvents = True
in allen positionen zu platzieren aber nichts
der kode sollte bewirken, dass bei der eingabe von buchstaben in den untenangeführten bereich, sich die zellen entsprechen einfärben
aber es läuft absolut nicht
auch eine MsgBox, die ich im ersten Case eingefügt habe wird nicht ausgehführt
bin dankbar für jeden tipp
Public gr_kl As Integer
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = True
Const TARGETRANGE As String = "B5:AT46"
Const LISTRANGE As String = "B5:AT46"
Dim rngListPart As Range
Dim c As Range
Dim lngColor As Long
Dim fntColot As Long
For Each c In Target
If Not Intersect(Range(TARGETRANGE), c) Is Nothing Then
' On Error GoTo ErrHandler
Application.EnableEvents = False
If gr_kl = 1 Then
aa = "a": bb = "b": cc = "c": dd = "d": ee = "e": ff = "f": gg = "g": hh = "h": ii = "i"
jj = "j": kk = "k": ll = "l": mm = "m": nn = "n": oo = "o": pp = "p": qq = "q": rr = "r"
ss = "s": tt = "t": uu = "u": vv = "v": ww = "w": xx = "x": yy = "y": zz = "z"
Else
aa = "A": bb = "B": cc = "C": dd = "D": ee = "E": ff = "F": gg = "G": hh = "H": ii = "I"
jj = "J": kk = "K": ll = "L": mm = "M": nn = "N": oo = "O": pp = "P": qq = "Q": rr = "R"
ss = "S": tt = "T": uu = "U": vv = "V": ww = "W": xx = "X": yy = "Y": zz = "Z"
End If
Select Case c.Value
Case Is = aa
lngColor = 3
fntColor = 3
Case Is = bb
lngColor = 4
fntColor = 4
Case Is = cc
lngColor = 5
fntColor = 5
Case Is = dd
lngColor = 6
fntColor = 6
Case Is = ee
lngColor = 7
fntColor = 7
Case Is = ff
lngColor = 8
fntColor = 8
Case Is = gg
lngColor = 15
fntColor = 15
Case Is = hh
lngColor = 17
fntColor = 17
Case Is = ii
lngColor = 19
fntColor = 19
Case Is = jj
lngColor = 20
fntColor = 20
Case Is = kk
lngColor = 22
fntColor = 22
Case Is = ll
lngColor = 24
fntColor = 24
Case Is = mm
lngColor = 26
fntColor = 26
Case Is = nn
lngColor = 43
fntColor = 43
Case Is = oo
lngColor = 28
fntColor = 28
Case Is = pp
lngColor = 33
fntColor = 33
Case Is = qq
lngColor = 34
fntColor = 34
Case Is = rr
lngColor = 35
fntColor = 35
Case Is = ss
lngColor = 36
fntColor = 36
Case Is = tt
lngColor = 38
fntColor = 38
Case Is = uu
lngColor = 39
fntColor = 39
Case Is = vv
lngColor = 40
fntColor = 40
Case Is = ww
lngColor = 42
fntColor = 42
Case Is = xx
lngColor = 44
fntColor = 44
Case Is = yy
lngColor = 47
fntColor = 47
Case Is = zz
lngColor = 48
fntColor = 48
Case Is = ""
lngColor = xlNone
Case Is = " "
lngColor = xlNone
Case Else
lngColor = xlNone
End Select
c.Interior.ColorIndex = lngColor
c.Font.ColorIndex = fntColor
'Application.EnableEvents = True
'ErrHandler:
' If Err.Number = 13 Then
' Application.EnableEvents = True
' Rows(c.Row).Interior.ColorIndex = xlNone
' End If
End If
Next
End Sub

Google-Anzeigen
Geschickt von Tutenchamun, Mi 30.04.2008 9:39

Google-Anzeigen


Warum immer zahlen? Einfach kostenlose Software downloaden:
Kostenlose
Spiele

Kostenlos spielen!
Kostenlose
Fotosoftware

Kostenlose Fotosoftware!
Kostenlose
Terminplaner

Kostenlose Terminplaner!
Kostenlose
3D Simulatoren

Kostenlose 3D-Simulatoren!
Kostenlose
PC-Tools

Kostenlose PC-Utilities!
Kostenlose
Brettspiele

Kostenlose Brettspiele!
Kostenlose
MP3 Tools

Kostenlose MP3-Tools!

Kostenlose Android Apps für Tablet PCs wie dem Galaxy Tab und Xoom
Free android tablet app downloads: Games, Security, Antivirus, Filemanager for your Tab.
Kostenlose Software-Grundausstattung für Windows-PCs Kostenlose Software-Vollausstattung für Windows-PCs
Kostenlos spielen - Spiele Downloads ohne Limits

cs
es
fr
it
no
pl
pt
tl
tr
ru

Spotlight.de distanziert sich ausdrücklich von im Forum eingestellten Fremdinhalten jeglicher Art.


Kostenlose
Antiviren-
software!
Kostenlose Antivirensoftware!


Kostenlose
Spiele!
Kostenlose Spiele!


Android
Apps für
Tablet-PCs!
Andriod Tablet Apps z. B. für Samsung Galaxy Tab


Kostenlose
3D-
Simulatoren!
Kostenlose 3D-Simulatoren!


Kostenlose
PC-Utilities!
Kostenlose PC-Utilities!


Kostenlose
Terminplaner!
Kostenlose Terminplaner!


Kostenlose
Grafik-
software!
Kostenlose Grafiksoftware!