Avatar billede frbl Nybegynder
26. januar 2013 - 16:45 Der er 10 kommentarer og
1 løsning

Lang Visual basic kode, hjælp til at ændre den så den kan køre

Hej derude

Jeg har oprettet nedenstående visual basic kode = kryds i et bestemt felt vælger bestemte ark - der kan kun sættes et kryds, når dette slettes eller der sættes et kryds mere skal enten alle ark vælges eller de ark der er bestemt i feltet hvor det nye x er sat og det først satte x fjernes.

Koden:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("E3")) Is Nothing Then
    Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("F3")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("G3")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("H3")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("E4")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("F4")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("G4")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("H4")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("E5")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("F5")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("G5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("G5")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("H5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visible = False
        Worksheets(43).Visible = False
        Worksheets(44).Visible = False
        Worksheets(45).Visible = False
        Worksheets(46).Visible = False
        Worksheets(47).Visible = False
        Worksheets(48).Visible = False
        Worksheets(49).Visible = False
        Worksheets(50).Visible = False
        Worksheets(51).Visible = False
        Worksheets(52).Visible = False
        Worksheets(53).Visible = False
        Worksheets(54).Visible = False
        Worksheets(55).Visible = False
        Worksheets(56).Visible = False
        Worksheets(57).Visible = False
        Worksheets(58).Visible = False
        Worksheets(59).Visible = False
        Worksheets(60).Visible = False
        Else
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = True
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = True
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = True
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = True
        Worksheets(14).Visible = True
        Worksheets(15).Visible = True
        Worksheets(16).Visible = True
        Worksheets(17).Visible = True
        Worksheets(18).Visible = True
        Worksheets(19).Visible = True
        Worksheets(20).Visible = True
        Worksheets(21).Visible = True
        Worksheets(22).Visible = True
        Worksheets(23).Visible = True
        Worksheets(24).Visible = True
        Worksheets(25).Visible = True
        Worksheets(26).Visible = True
        Worksheets(27).Visible = True
        Worksheets(28).Visible = True
        Worksheets(29).Visible = True
        Worksheets(30).Visible = True
        Worksheets(31).Visible = True
        Worksheets(32).Visible = True
        Worksheets(33).Visible = True
        Worksheets(34).Visible = True
        Worksheets(35).Visible = True
        Worksheets(36).Visible = True
        Worksheets(37).Visible = True
        Worksheets(38).Visible = True
        Worksheets(39).Visible = True
        Worksheets(40).Visible = True
        Worksheets(41).Visible = True
        Worksheets(42).Visible = True
        Worksheets(43).Visible = True
        Worksheets(44).Visible = True
        Worksheets(45).Visible = True
        Worksheets(46).Visible = True
        Worksheets(47).Visible = True
        Worksheets(48).Visible = True
        Worksheets(49).Visible = True
        Worksheets(50).Visible = True
        Worksheets(51).Visible = True
        Worksheets(52).Visible = True
        Worksheets(53).Visible = True
        Worksheets(54).Visible = True
        Worksheets(55).Visible = True
        Worksheets(56).Visible = True
        Worksheets(57).Visible = True
        Worksheets(58).Visible = True
        Worksheets(59).Visible = True
        Worksheets(60).Visible = True
    End If
    End If
        If Not Intersect(Target, Range("H5")) Is Nothing Then
        Application.ScreenUpdating = False
        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("F3").Value = ""
        Range("G3").Value = ""
        Range("H3").Value = ""
        Range("E4").Value = ""
        Range("F4").Value = ""
        Range("G4").Value = ""
        Range("H4").Value = ""
        Range("E5").Value = ""
        Range("F5").Value = ""
        Range("G5").Value = ""
        Range("E6").Value = ""
        Range("F6").Value = ""
        Range("G6").Value = ""
        Range("H6").Value = ""
        Range("E8").Value = ""
        Range("F8").Value = ""
        Range("G8").Value = ""
        Range("H8").Value = ""
        Range("E9").Value = ""
        Range("F9").Value = ""
        Range("G9").Value = ""
        Range("H9").Value = ""
        Range("E11").Value = ""
        Range("F11").Value = ""
        Range("G11").Value = ""
        Range("H11").Value = ""
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
        Worksheets(14).Visible = False
        Worksheets(15).Visible = False
        Worksheets(16).Visible = False
        Worksheets(17).Visible = False
        Worksheets(18).Visible = False
        Worksheets(19).Visible = False
        Worksheets(20).Visible = False
        Worksheets(21).Visible = False
        Worksheets(22).Visible = False
        Worksheets(23).Visible = False
        Worksheets(24).Visible = False
        Worksheets(25).Visible = False
        Worksheets(26).Visible = False
        Worksheets(27).Visible = False
        Worksheets(28).Visible = False
        Worksheets(29).Visible = False
        Worksheets(30).Visible = False
        Worksheets(31).Visible = False
        Worksheets(32).Visible = False
        Worksheets(33).Visible = False
        Worksheets(34).Visible = False
        Worksheets(35).Visible = False
        Worksheets(36).Visible = False
        Worksheets(37).Visible = False
        Worksheets(38).Visible = False
        Worksheets(39).Visible = False
        Worksheets(40).Visible = False
        Worksheets(41).Visible = False
        Worksheets(42).Visib
Avatar billede claes57 Ekspert
26. januar 2013 - 17:51 #1
du skal bruge radio-knapper hvis der kun må vælges en af en serie.
Og lav en kort kode, der .Visible = False på alle ark (kaldes ved start), og for den valgte skal du så .Visible = True på de tilladte.
Avatar billede store-morten Ekspert
26. januar 2013 - 18:32 #2
Se:
http://www.eksperten.dk/spm/975790
Dobbelt spørgsmål?
Avatar billede frbl Nybegynder
26. januar 2013 - 18:38 #3
forklar mig lige lidt mere om radio knap.
korrekt det er en fejl med dobbelt spørgsmål - beklager:-(
Avatar billede claes57 Ekspert
26. januar 2013 - 18:48 #4
radio-knap ser du fx her lige over kommentar-boksen - man kan kun vælge enten kommentar eller svar - men der kan ikke markeres i begge.
En afkrydsning er en mulighed blandt mange, og flere kan vælges (fx hvilke aviser læser du - sæt kryds ved alle)

Med en radio-knap ved du hvilket felt, der er valgt, og så nulstiller du alle ark (Range("x0").Value = "" er jo klaret), og så skal du bare køre de synlige ark igennem (der er sikkert en logisk måde at reducere dem på også - jeg har bare ikke luret
        Worksheets(2).Visible = True
        Worksheets(3).Visible = True
        Worksheets(4).Visible = False
        Worksheets(5).Visible = True
        Worksheets(6).Visible = True
        Worksheets(7).Visible = False
        Worksheets(8).Visible = True
        Worksheets(9).Visible = True
        Worksheets(10).Visible = False
        Worksheets(11).Visible = True
        Worksheets(12).Visible = True
        Worksheets(13).Visible = False
af - men nogle er nok true ved klik i e, og andre ved et rækkenummer, så det skulle kunne lade sig gøre)
Avatar billede store-morten Ekspert
26. januar 2013 - 19:31 #5
Prøv:
Sub VisAlleArk()
Dim w As Integer
    'vælg ark nummer 1
    ActiveWorkbook.Worksheets(1).Select
    'fra 1. ark til sidste ark
    For w = 1 To ThisWorkbook.Worksheets.Count
            Worksheets(w).Visible = True
    Next w
    'vælg ark nummer 1
    ActiveWorkbook.Worksheets(1).Select
End Sub

Sub Skjul_13_til_SidsteArk()
Dim w As Integer
    'vælg ark nummer 1
    ActiveWorkbook.Worksheets(1).Select
    'fra 13. ark til sidste ark
    For w = 13 To ThisWorkbook.Worksheets.Count
            Worksheets(w).Visible = False
    Next w
    'vælg ark nummer 1
    ActiveWorkbook.Worksheets(1).Select
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Afslut
    If Not Intersect(Target, Range("E3")) Is Nothing Then
    Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False
   
If Target.Value = "x" Then
        Range("F3:H3").Value = ""
        Range("E4:G4").Value = ""
        Range("E5:E6").Value = ""
        Range("F5:F6").Value = ""
        Range("E8:H8").Value = ""
        Range("F8:H8").Value = ""
        Range("E9:H9").Value = ""
        Range("E11:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub
    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

  If Not Intersect(Target, Range("F3")) Is Nothing Then
    Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3").Value = ""
        Range("G3:H3").Value = ""
        Range("E4:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub
    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("G3")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:F3").Value = ""
        Range("H3").Value = ""
        Range("E4:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("H3")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
            Application.ScreenUpdating = False
   
        If Target.Value = "x" Then
        Range("E3:G3").Value = ""
        Range("E4:H11").Value = ""
       
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If
   
        If Not Intersect(Target, Range("E4")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk
Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("F4")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Call Skjul_13_til_SidsteArk
Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("G4")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If
   
        If Not Intersect(Target, Range("H4")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("E5")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("F5")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Worksheets(11).Visible = False
        Worksheets(12).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

        If Not Intersect(Target, Range("G5")) Is Nothing Then
            Application.EnableEvents = False 'For at undgå at koden looper
    Application.ScreenUpdating = False

        If Target.Value = "x" Then
        Range("E3:H11").Value = ""
Call VisAlleArk
        Worksheets(4).Visible = False
        Worksheets(7).Visible = False
        Worksheets(10).Visible = False
        Call Skjul_13_til_SidsteArk

Application.EnableEvents = True
Exit Sub

    End If
    Call VisAlleArk
    Application.ScreenUpdating = True
    Application.EnableEvents = True
End If

Afslut:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub

Som er til Target, Range("G5")
Skal testes for fejl!!!
Avatar billede claes57 Ekspert
26. januar 2013 - 20:28 #6
mønster ved ark-synlighed:

ved klik i e,g,h
2-12 true, dog 4,7,10 false

ved klik i f
2-12 true, dog 4,7,10,11,12 false

ved radio-knap er der altid valgt en - så alle=true sker ikke.

det kan så reduceres:
alle er false fra start
2-12 true, men 4,7,10 true
hvis der er klikket i f, så er også 11,12 false
og alt med range er udgået...
Avatar billede claes57 Ekspert
26. januar 2013 - 20:30 #7
linjen
2-12 true, men 4,7,10 true
skal vre
2-12 true, men 4,7,10 false
Avatar billede frbl Nybegynder
27. januar 2013 - 13:33 #8
claes

Kunne du skrive koden i en lang række til copy/paste så kan jeg teste om det virker.
Avatar billede store-morten Ekspert
12. februar 2013 - 05:24 #9
Har du mistet interessen?
Avatar billede frbl Nybegynder
18. marts 2013 - 21:22 #10
Nej - det blev nok bare for langhåret
Avatar billede store-morten Ekspert
18. marts 2013 - 22:02 #11
For langhåret !!!

Koden er ellers barberet en del ned, i forhold til #0

Har du testet den?

Ærgeligt at há brugt tid på det, og der lukkes uden videre ;-(
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
IT-kurser om Microsoft 365, sikkerhed, personlig vækst, udvikling, digital markedsføring, grafisk design, SAP og forretningsanalyse.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester