Results 1 to 23 of 23

Change(ByVal Target As Range) does not work when Target value changes

Threaded View

  1. #1
    Registered User
    Join Date
    12-30-2012
    Location
    NL
    MS-Off Ver
    Excel 2010
    Posts
    17

    Change(ByVal Target As Range) does not work when Target value changes

    I am trying to hide/show columns based ona calculated value in cell B3.
    When I change the value in B3 manually all goes fine, however if the value in B3 is a formula it doestnt work. What's wrong??


    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target.Address = "$B$3" Then
            Select Case Target.Value
            Case Is = "1"
                Columns("C").EntireColumn.Hidden = False
                Columns("D:U").EntireColumn.Hidden = True
            Case Is = "2"
                Columns("C:D").EntireColumn.Hidden = False
                Columns("E:U").EntireColumn.Hidden = True
    ... etc
    Last edited by LeonvL; 01-07-2013 at 06:47 PM. Reason: solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1