Consulting

Results 1 to 4 of 4

Thread: Solved: Working With Named Ranges

  1. #1

    Solved: Working With Named Ranges

    How do I change this piece of code to function with named ranges?
    [vba]Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    'needs to target Range Name "Pics"
    If Target.Column = 7 Then ViewPicture Target
    [/vba]
    LarryLaser

    neogeek in training

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    'needs to target Range Name "Pics"
    If Not Intersect(Target, Range("Pics")) Is Nothing Then
    ViewPicture Target.Value
    End If[/vba]

  3. #3
    Awsome,
    Thanks xld

    btw, I like your new avatar.
    LarryLaser

    neogeek in training

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by LarryLaser
    btw, I like your new avatar.
    Coutesy of Simon Lloyd.

Posting Permissions

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