+ Reply to Thread
Results 1 to 5 of 5

Launch multiple userforms using double click

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Launch multiple userforms using double click

    I'm new to VBA and need some help.

    I have a worksheet with User forms. I have code that launches and locates my first user form when I double click within a range of cells. I would like to add a second range that will launch the second user form

    my Code
    Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
    If Not Application.Intersect(Target, Range("B6:B206")) Is Nothing Then
    Cancel = True

    With DIMENSION_TYPES_LIST

    .StartUpPosition = 0
    .Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width) - 500
    .Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
    .Show

    End With
    End If

    End Sub
    My second range is c6 to c206 and the form name is frmdimensionbuilder

    Thanks

    Steve

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Launch multiple userforms using double click

    You don't mention if you want both forms displayed at the same time - assuming not.
    Please Login or Register  to view this content.
    Typed freehand and guaranteed 100% untested...

  3. #3
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Re: Launch multiple userforms using double click

    Cytop,

    You assumed correctly, Thank you for the response

    I had to rem out the .startup position = 0 to get it to fire. it's amazing how complicated it is just to locate a form in VBA

    thanks

    Steve

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Launch multiple userforms using double click

    ...it's amazing how complicated it is just to locate a form in VBA
    You should try positioning a custom pop-up menu at the mousepointer sometime ...

  5. #5
    Registered User
    Join Date
    10-17-2014
    Location
    Plymouth, ma
    MS-Off Ver
    2010
    Posts
    30

    Re: Launch multiple userforms using double click

    I'll take your word for it, My head already hurts

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Double click event with multiple if statements
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-24-2014, 01:20 AM
  2. Changing cell properties with double click, then revert with another double click
    By mweber2525 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-01-2014, 01:40 PM
  3. [SOLVED] Double click to add current date in multiple columns
    By MAI2010 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-17-2013, 05:39 PM
  4. Double click code/from multiple sheets to one cell
    By eai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2011, 09:45 AM
  5. double click a cell to launch add-in form
    By tonywright in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-27-2011, 10:58 AM

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