Hallo zusammen,
ich brauche bitte mal Unterstützung für die Konvertierung von VBA zu Google Sheets.
Ich habe folgenden Code beim Aktivieren des Blatts:
Private Sub Worksheet_Activate()
ActiveSheet.Unprotect Password:="12345"
ActiveSheet.Range("a1:a75").Rows.EntireRow.AutoFit
ActiveSheet.Rows("7:9").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(15, 7)
ActiveSheet.Rows("10:12").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(26, 7)
ActiveSheet.Rows("13:15").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(36, 7)
ActiveSheet.Rows("16:18").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(44, 7)
ActiveSheet.Rows("19:21").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(52, 7)
If ActiveWorkbook.Sheets("YSQ-L3").Cells(15, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(26, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(36, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(44, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(52, 7) = True Then
ActiveSheet.Rows("3:6").EntireRow.Hidden = False
Else
ActiveSheet.Rows("3:6").EntireRow.Hidden = True
End If
......
......
......
ActiveSheet.Protect Password:="12345"
End Sub
Jetzt brauche ich bitte einen Ansatz, also wo finde ich in Sheets das Ereignis, wie setzt ich den Blattschutz, wie geht ein if-then-else, .......
Merci !
ich brauche bitte mal Unterstützung für die Konvertierung von VBA zu Google Sheets.
Ich habe folgenden Code beim Aktivieren des Blatts:
Private Sub Worksheet_Activate()
ActiveSheet.Unprotect Password:="12345"
ActiveSheet.Range("a1:a75").Rows.EntireRow.AutoFit
ActiveSheet.Rows("7:9").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(15, 7)
ActiveSheet.Rows("10:12").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(26, 7)
ActiveSheet.Rows("13:15").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(36, 7)
ActiveSheet.Rows("16:18").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(44, 7)
ActiveSheet.Rows("19:21").EntireRow.Hidden = Not ActiveWorkbook.Sheets("YSQ-L3").Cells(52, 7)
If ActiveWorkbook.Sheets("YSQ-L3").Cells(15, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(26, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(36, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(44, 7) = True Or _
ActiveWorkbook.Sheets("YSQ-L3").Cells(52, 7) = True Then
ActiveSheet.Rows("3:6").EntireRow.Hidden = False
Else
ActiveSheet.Rows("3:6").EntireRow.Hidden = True
End If
......
......
......
ActiveSheet.Protect Password:="12345"
End Sub
Jetzt brauche ich bitte einen Ansatz, also wo finde ich in Sheets das Ereignis, wie setzt ich den Blattschutz, wie geht ein if-then-else, .......
Merci !