Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
904to908
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
904to908
904to908
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Absturz beim Speichern

Absturz beim Speichern
14.09.2007 12:57:31
Thomas
Hallo
ich, bzw. wir, haben ein Problem. Ich habe eine Exceltabelle mit Macros in VBA erstellt. Diese Datei befindet sich in unserer Firma auf dem Server, so das jeder darauf zugreifen kann. Ich kann unter meiner Windowsanmeldung diese Datei bearbeiten und speichern. Meine Kollege kann die Datei bearbeiten, aber beim speichern stürzt Excel mit einer Fehlermeldung ab.
Wir haben beide die vollen Zugriffsrechte und können uns deshalb das Phänomen nicht erklären. Wenn ich mich mit meinem Namen/Passwort auf dem Rechner meines Kollegen anmelde funktioniert es auch, nur halt nicht unter seiner Windowsanmeldung. Unsere IT-Abteilung weis sich auch nicht mehr zu helfen.
Hat hier vielleicht jemand eine Idee woran das liegen könnte.
In Erwartung
Thomas

6
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Absturz beim Speichern
14.09.2007 13:14:00
Walburga
Hi Thomas
überprüf mal deine Makros! Evtl unsauber programmiert! insbesondere die Ereignismakros SAVE oder CLOSE!?
Gruss Walburga

AW: Absturz beim Speichern
14.09.2007 13:28:48
Thomas
Hallo
An den Macros kann ich nichts finden. Was ich nicht erwähnt hatte, es hat am Anfang schon mal funktioniert.
Inzwischen sind natürlich einige Funktionen hinzugekommen. Das komische ist ja, das es bei mir funktioniert.
Die Ereignismakros Save und Close habe ich gar nicht verwendet.
Gruß Thomas

AW: Absturz beim Speichern
14.09.2007 14:02:00
Wolli
Hallo Thomas,
1.) Wenn es mit der Windows-Anmeldung zu tun hat - was ja offensichtlich der Fall ist - vergleiche Eure beiden Profile: Eingebundene Laufwerke, sonstige Berechtigungen. Excel berechnet ja beim Speichern neu (kannst Du mal probeweise deaktivieren in Extras - Optionen - Berechnung - Manuell - ...haken weg), vielleicht sucht es dann irgendwelche Verknüpfungen, die der Kollege nicht hat!
2.) Falls Ihr noch alte Dateiversionen habt, sucht den Unterschied bis zum Absturzpunkt - in der Differenz muss es dann ja liegen.
Viel Glück, Wolli

Anzeige
AW: Absturz beim Speichern
14.09.2007 14:18:00
Thomas
Hallo
1) hab ich probiert, aber ohne Erfolg
2) Nein, wir haben keine alte Versionen mehr
Mir ist noch aufgefallen, das es kein Problem gibt, wenn ich keine Makros starte und dann speichere. Dann muß es woll doch an einem der Makros liegen. Muß ich woll nochmal suchen.
Trotzdem Danke für die Hilfe

AW: Absturz beim Speichern
14.09.2007 14:25:00
Thomas
Hab hier nochmal das Makro, welches ausgeführt wurde vorm speichern. Eigentlich kann ich nix finden.
</p><pre>Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngUnion As Range, rngUBereich As Range
If Target.Count > 1 Then Exit Sub
Set rngUBereich = Worksheets("1Halbjahr").Range("E5:GK35")
Set rngUnion = Application.Union(Range(Target.Address), rngUBereich)
If rngUnion.Address <> rngUBereich.Address Then Exit Sub
Select Case Target.Value
Case "l"
Target.Value = "L"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 46
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "L"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 46
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "e"
Target.Value = "E"
Target.Interior.ColorIndex = 15
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "E"
Target.Interior.ColorIndex = 15
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "u"
Target.Value = "U"
Target.Interior.ColorIndex = 5
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "U"
Target.Interior.ColorIndex = 5
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "uu"
Target.Value = "U"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 45
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "UU"
Target.Value = "U"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 45
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "k"
Target.Value = "K"
Target.Interior.ColorIndex = 3
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "K"
Target.Interior.ColorIndex = 3
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "kk"
Target.Value = "K"
Target.Interior.ColorIndex = 44
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "KK"
Target.Interior.ColorIndex = 44
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "d"
Target.Value = "D"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 6
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "D"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 6
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "a"
Target.Value = "A"
Target.Interior.ColorIndex = 7
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "A"
Target.Interior.ColorIndex = 7
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "v"
Target.Value = "V"
Target.Interior.ColorIndex = 17
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "V"
Target.Interior.ColorIndex = 17
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "f"
Target.Value = "F"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "F"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "p"
Target.Value = "P"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "P"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "FF"
Target.Value = "F"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "ff"
Target.Value = "F"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "s"
Target.Value = "S"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "S"
If Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "SS"
Target.Value = "S"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "ss"
Target.Value = "S"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "n"
Target.Value = "N"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "N"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "NN"
Target.Value = "N"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "nn"
Target.Value = "N"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "t"
Target.Value = "T"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "T"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "TT"
Target.Value = "T"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "tt"
Target.Value = "T"
If Target.Interior.ColorIndex <> 36 And Target.Interior.ColorIndex <> 4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
End Select
End Sub</pre><p>

Anzeige
AW: Absturz beim Speichern
14.09.2007 15:08:54
Rudi
Hallo,
hast du mal nen Haltepunkt gesetzt und bist das Makro von Hand durchgegangen?
Das ruft sich immer wieder selbst auf, da ja Zellen geändert werden.
Außerdem kann man es auf die Hälfte kürzen.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngUnion As Range, rngUBereich As Range
If Target.Count > 1 Then Exit Sub
Set rngUBereich = Worksheets("1Halbjahr").Range("E5:GK35")
Set rngUnion = Application.Union(Range(Target.Address), rngUBereich)
If rngUnion.Address  rngUBereich.Address Then Exit Sub
On Error GoTo FEHLER
Application.EnableEvents = False
Select Case UCase(Target.Value)
Case "L"
Target = UCase(Target)
If Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = 46
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "E"
Target = UCase(Target)
Target.Interior.ColorIndex = 15
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "U"
Target = UCase(Target)
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "UU"
Target = UCase(Target)
If Target.Interior.ColorIndex  36 And Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = 45
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "K"
Target = UCase(Target)
Target.Interior.ColorIndex = 3
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "KK"
Target = "K"
Target.Interior.ColorIndex = 44
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "D"
Target.Value = "D"
If Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = 6
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "A"
Target.Value = "A"
Target.Interior.ColorIndex = 7
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "V"
Target = UCase(Target)
Target.Interior.ColorIndex = 17
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
Case "F", "P", "S"
Target = UCase(Target)
If Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
Case "FF", "SS", "NN", "TT"
Target = UCase(Left(Target, 1))
If Target.Interior.ColorIndex  36 And Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = xlNone
Target.Font.FontStyle = "Fett"
Target.Font.ColorIndex = 3
End If
Case "N", "T"
Target = UCase(Target)
If Target.Interior.ColorIndex  36 And Target.Interior.ColorIndex  4 Then
Target.Interior.ColorIndex = 8
Target.Font.FontStyle = "Standart"
Target.Font.ColorIndex = xlAutomatic
End If
End Select
FEHLER:
Application.EnableEvents = True
End Sub


Gruß
Rudi
Eine Kuh macht Muh, viele Kühe machen Mühe

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige