+ Reply to Thread
Results 1 to 2 of 2

ByVal Target As Range Issue -Requires mouse click away from validation list to action

Hybrid View

khaydon1987 ByVal Target As Range Issue... 01-26-2012, 01:37 PM
khaydon1987 Re: ByVal Target As Range... 01-30-2012, 09:46 AM
  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    ByVal Target As Range Issue -Requires mouse click away from validation list to action

    Hi, i was wondering if one of you could give me a hand with this.

    It's probably a minor issue but i can't seem to find the answer on anyone elses post.

    I've two Private Subs on a worksheet, they link to cells with validation lists.

    Cell "C5" (Private Sub Worksheet_SelectionChange) ... hides columns

    Cell "C6" Private Sub Worksheet_Change(ByVal Target As Range) ... hides rows

    Codes attached,

    The problem i have is that when i select text from the validation list to hide columns, i have to click away from the list on to another cell for it to action. I do not have this problem with hiding rows, when i select from this one it automatically hides the appropriate rows ...

    Any ideas, would be very helpful .... Cheers

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target.Address = "$C$6" Then
            Range("A1:A320").EntireRow.Hidden = False
            If Target = "General Overview" Then
                Range("A10:A57,A60:A275,A283:A316").EntireRow.Hidden = True
            End If
    End Sub
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Select Case Range("C5").Value
    Case Is = "Total"
    Columns("C:AO").EntireColumn.Hidden = False
    Columns("K:X").EntireColumn.Hidden = True
    End Select
    End Sub

  2. #2
    Registered User
    Join Date
    11-09-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: ByVal Target As Range Issue -Requires mouse click away from validation list to ac

    any ideas????

+ Reply to Thread

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