+ Reply to Thread
Results 1 to 6 of 6

Select Row to Open Form

Hybrid View

karl_009 Select Row to Open Form 01-13-2010, 12:16 PM
Palmetto Re: Select Row to Open Form 01-13-2010, 12:35 PM
Domski Re: Select Row to Open Form 01-13-2010, 12:35 PM
karl_009 Re: Select Row to Open Form 01-13-2010, 12:50 PM
Palmetto Re: Select Row to Open Form 01-13-2010, 01:00 PM
karl_009 Re: Select Row to Open Form 01-13-2010, 01:06 PM
  1. #1
    Registered User
    Join Date
    04-09-2008
    Posts
    65

    Select Row to Open Form

    Hi,

    Am having some trouble expanding the range of this macro, I would like it to go from A5:AA5 so when someone double clicks the cell the form will open for this row.

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        If Target(1, 1).Address = "$A$5" Then
            Cancel = True
             UserForm1.Show
        End If
    End Sub
    Many Thanks
    Karl
    Last edited by karl_009; 01-13-2010 at 05:38 PM.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Select Row to Open Form

    Use

    If Not Intersect(Target,Range("A5:AA5")) Is Nothing Then
    Last edited by Palmetto; 01-13-2010 at 12:42 PM. Reason: amend code to add quotes around range
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Select Row to Open Form

    Try:

    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
        If Not Intersect(Target(1, 1), Range("A5:AA5")) Is Nothing Then
            Cancel = True
             UserForm1.Show
        End If
    End Sub
    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    04-09-2008
    Posts
    65

    Re: Select Row to Open Form

    Works Great...

    Many Thanks
    Karl

  5. #5
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Select Row to Open Form

    Please mark your thread as solved and remember to leave feed back / add to the reputation of those who contributed a helpful response. See my signature for how to go about it.

  6. #6
    Registered User
    Join Date
    04-09-2008
    Posts
    65

    Re: Select Row to Open Form

    Hi,

    Where do you mark it as solved, I found the other part but cannot find where to mark it as solved...

    Thanks
    Karl

+ 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