Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #109836

Re: Change event for all sheets in WBook

From Claus Busch <claus_busch@t-online.de>
Newsgroups microsoft.public.excel.programming
Subject Re: Change event for all sheets in WBook
Date 2017-02-03 09:48 +0100
Organization A noiseless patient Spider
Message-ID <o71g1e$2p6$1@dont-email.me> (permalink)
References <62f203af-b62b-4bd7-b800-e2a6389a0d13@googlegroups.com> <o71djd$qpc$1@dont-email.me> <o71do7$rau$1@dont-email.me> <0a824b41-ce38-4edc-8f94-038ea5cb82a3@googlegroups.com>

Show all headers | View raw


Hi Howard,

Am Fri, 3 Feb 2017 00:35:15 -0800 (PST) schrieb L. Howard:

> It hides with CS but does not unhide with SA.

I thought it should hide with both values and unhide with any other.

Try:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
If Target.Address(0, 0) <> "H8" Or Target.Count > 1 Then Exit Sub

Dim flag As Boolean

Select Case Target.Value
    Case "CS"
        flag = True
    Case "SA"
        flag = False
End Select
For Each Sh In Worksheets
    With Sh
        .Rows("23:28").Hidden = flag
    End With
Next
End Sub


Regards
Claus B.
-- 
Windows10
Office 2016

Back to microsoft.public.excel.programming | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Change event for all sheets in WBook "L. Howard" <lhkittle@comcast.net> - 2017-02-02 23:46 -0800
  Re: Change event for all sheets in WBook Claus Busch <claus_busch@t-online.de> - 2017-02-03 09:06 +0100
    Re: Change event for all sheets in WBook Claus Busch <claus_busch@t-online.de> - 2017-02-03 09:09 +0100
      Re: Change event for all sheets in WBook "L. Howard" <lhkittle@comcast.net> - 2017-02-03 00:35 -0800
        Re: Change event for all sheets in WBook Claus Busch <claus_busch@t-online.de> - 2017-02-03 09:48 +0100
          Re: Change event for all sheets in WBook "L. Howard" <lhkittle@comcast.net> - 2017-02-03 01:02 -0800

csiph-web