Live-Forum - Die aktuellen Beiträge
Datum
Titel
24.04.2024 19:29:30
24.04.2024 18:49:56
Anzeige
Archiv - Navigation
708to712
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
708to712
708to712
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Kommentare überall ausblenden

Kommentare überall ausblenden
22.12.2005 08:04:15
Heinz
Guten morgen Leute
Ich habe bei der Stundenliste von meiner Firma ein wenig rumgebastelt.Unter anderen auch einige Formeln zum löschen gesichert.Aber das geht nur mit Kommentare.Nun sind überall die roten Ecken.
Wenn ich bei mir unter Extras die "Kommentare nicht anzeigen" sind die roten Ecken natürlich weg.
ABER wenn ich die Liste in das Lohbüro senden muss sind sie dort wieder ersichtlich.
Gibt es dazu ein Makro das sie überall nicht ersichtlich sind ?
Gruß Heinz

8
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Kommentare überall ausblenden
22.12.2005 08:55:57
Josef
Hallo Heinz!
In das Modul "DieseArbeitsmappe"!
' **********************************************************************
' Modul: DieseArbeitsmappe Typ: Element der Mappe(Sheet, Workbook, ...)
' **********************************************************************

Option Explicit

Private Sub Workbook_Deactivate()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub


Private Sub Workbook_Open()
Application.DisplayCommentIndicator = xlNoIndicator
End Sub


'******************************
'* Gruß Sepp
'*
'* Rückmeldung wäre nett!
'******************************

Anzeige
AW: Kommentare überall ausblenden
22.12.2005 09:17:35
Heinz
Hallo Sepp
Habe Dein Makro eingebaut,aber leider wenn ich die Kommentare unter Extras Ausblende und dann die Arbeitsmappe neu öffne sind sie wieder da.
Habe ich einen Fehler gemacht ?
Wärst Du bitte so nett und könntest mal nachsehen ?
Danke Heinz
https://www.herber.de/bbs/user/29492.xls
AW: Kommentare überall ausblenden
22.12.2005 09:35:15
Josef
Hallo Heinz!
Schau dir mal den Code in "DieseArbeitsmappe" an!
Den hast du ganz schön durcheinander gewirbelt;-)
Wenn du nicht klar kommst, dann poste mal den Code wie er bisher ausgesehen hat.
'******************************
'* Gruß Sepp
'*
'* Rückmeldung wäre nett!
'******************************

Anzeige
AW: Kommentare überall ausblenden
22.12.2005 09:39:05
Heinz
Hallo Josef
So sieht der Code Original aus.
Danke Heinz

Private Sub Workbook_Open()
End Sub

With Application
.Calculation = xlCalculationAutomatic
.MaxChange = 0.001
End With
End Sub
End If
If Not IsNumeric(Target) Then Exit Sub
If Target = 0 And _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column))) = 0 Then
Application.EnableEvents = False
Cells(37, Target.Column) = ""
Cells(38, Target.Column) = ""
Application.EnableEvents = True
Exit Sub
End If
If Cells(10, Target.Column) = 2 Then
Application.EnableEvents = False
Cells(37, Target.Column) = _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
If Cells(37, Target.Column) > Cells(9, Target.Column) Then _
Cells(37, Target.Column) = Cells(9, Target.Column)
Application.EnableEvents = True
ActiveWindow.ScrollRow = 37
ElseIf Cells(10, Target.Column) = 3 Then
Application.EnableEvents = False
Cells(38, Target.Column) = _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
If Cells(38, Target.Column) > Cells(9, Target.Column) Then _
Cells(38, Target.Column) = Cells(9, Target.Column)
Application.EnableEvents = True
ActiveWindow.ScrollRow = 38
End If
ErrorHandler:
'MsgBox "Error Nummer :" & Err.Number
End Sub
Anzeige
AW: Kommentare überall ausblenden
22.12.2005 09:45:55
Josef
Hallo Heinz!
So kann der Code nicht aussehen, bzw. nicht funktionieren!
Alles nach dem ersten "End Sub" steht ausserhalb einer Prozedur!
Ausserdem wird im Code "Target" als Variable verwendet, das heist der
übrige Code gehört in eine Ereignissprozedur!
Zum Beispiel:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

End Sub


Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)

End Sub


Da scheint mir einiges faul zu sein;-((
'******************************
'* Gruß Sepp
'*
'* Rückmeldung wäre nett!
'******************************

Anzeige
AW: Kommentare überall ausblenden
22.12.2005 09:57:41
Heinz
Hallo Josef
Natürlich hattest Du recht.
Sorry aber das ist jetzt wirklich der Original Code
Danke Heinz

Private Sub Workbook_Open()
With Application
.Calculation = xlCalculationAutomatic
.MaxChange = 0.001
End With
End Sub


Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'2. u. 3. Schicht-Zulagen eintragen, wenn Stunden inm Bereich Normalarbeitszeit eingegeben werden.
On Error GoTo ErrorHandler
If Intersect(Target, Range("$N$13:$AR$20")) Is Nothing Then Exit Sub
If IsEmpty(Target) And _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column))) = 0 Then
Application.EnableEvents = False
Cells(37, Target.Column) = ""
Cells(38, Target.Column) = ""
Application.EnableEvents = True
Exit Sub
End If
If Not IsNumeric(Target) Then Exit Sub
If Target = 0 And _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column))) = 0 Then
Application.EnableEvents = False
Cells(37, Target.Column) = ""
Cells(38, Target.Column) = ""
Application.EnableEvents = True
Exit Sub
End If
If Cells(10, Target.Column) = 2 Then
Application.EnableEvents = False
Cells(37, Target.Column) = _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
If Cells(37, Target.Column) > Cells(9, Target.Column) Then _
Cells(37, Target.Column) = Cells(9, Target.Column)
Application.EnableEvents = True
ActiveWindow.ScrollRow = 37
ElseIf Cells(10, Target.Column) = 3 Then
Application.EnableEvents = False
Cells(38, Target.Column) = _
Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
If Cells(38, Target.Column) > Cells(9, Target.Column) Then _
Cells(38, Target.Column) = Cells(9, Target.Column)
Application.EnableEvents = True
ActiveWindow.ScrollRow = 38
End If
ErrorHandler:
'MsgBox "Error Nummer :" & Err.Number
End Sub

Anzeige
Na geht doch ;-)
22.12.2005 10:02:05
Josef
Hallo Heinz!
Das sieht schon besser aus!
Und so sollte es auch klappen.
' **********************************************************************
' Modul: DieseArbeitsmappe Typ: Element der Mappe(Sheet, Workbook, ...)
' **********************************************************************

Option Explicit

Private Sub Workbook_Deactivate()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub


Private Sub Workbook_Open()
With Application
  .DisplayCommentIndicator = xlNoIndicator
  .Calculation = xlCalculationAutomatic
  .MaxChange = 0.001
End With
End Sub




Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
'2. u. 3. Schicht-Zulagen eintragen, wenn Stunden inm Bereich Normalarbeitszeit eingegeben werden.
On Error GoTo ErrorHandler
If Intersect(Target, Range("$N$13:$AR$20")) Is Nothing Then Exit Sub
If IsEmpty(Target) And _
  Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column))) = 0 Then
  Application.EnableEvents = False
  Cells(37, Target.Column) = ""
  Cells(38, Target.Column) = ""
  Application.EnableEvents = True
  Exit Sub
End If

If Not IsNumeric(Target) Then Exit Sub

If Target = 0 And _
  Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column))) = 0 Then
  Application.EnableEvents = False
  Cells(37, Target.Column) = ""
  Cells(38, Target.Column) = ""
  Application.EnableEvents = True
  Exit Sub
End If

If Cells(10, Target.Column) = 2 Then
  Application.EnableEvents = False
  Cells(37, Target.Column) = _
    Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
  If Cells(37, Target.Column) > Cells(9, Target.Column) Then _
    Cells(37, Target.Column) = Cells(9, Target.Column)
  Application.EnableEvents = True
  ActiveWindow.ScrollRow = 37
ElseIf Cells(10, Target.Column) = 3 Then
  Application.EnableEvents = False
  Cells(38, Target.Column) = _
    Application.WorksheetFunction.Sum(Range(Cells(13, Target.Column), Cells(20, Target.Column)))
  If Cells(38, Target.Column) > Cells(9, Target.Column) Then _
    Cells(38, Target.Column) = Cells(9, Target.Column)
  Application.EnableEvents = True
  ActiveWindow.ScrollRow = 38
End If
ErrorHandler:
'MsgBox "Error Nummer :" & Err.Number
End Sub


'******************************
'* Gruß Sepp
'*
'* Rückmeldung wäre nett!
'******************************

Anzeige
AW: Na geht doch ;-)
22.12.2005 10:12:05
Heinz
Hallo Josef
Recht herzlichen Dank,Funkt.wirklich einwandfrei.
Danke & Gruß Heinz

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige