+ Reply to Thread
Results 1 to 7 of 7

Multiple User Froms on Right Click event

  1. #1
    Registered User
    Join Date
    09-15-2015
    Location
    England
    MS-Off Ver
    2016
    Posts
    25

    Multiple User Froms on Right Click event

    Could someone let me know how I can adapt the following code so that I can show a specific UserForm dependant on what cell the user right clicks please. I'm sure it is an easy fix but I am having brain block today !

    Many thanks in advance

    ps - there are another 4 Userforms to add into the mix as well once I know how to get them to work

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Multiple User Froms on Right Click event

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-15-2015
    Location
    England
    MS-Off Ver
    2016
    Posts
    25

    Re: Multiple User Froms on Right Click event

    Hi thanks for the reply but that is giving a compile error of Else without If

  4. #4
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Multiple User Froms on Right Click event

    Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-15-2015
    Location
    England
    MS-Off Ver
    2016
    Posts
    25

    Re: Multiple User Froms on Right Click event

    Hi Thanks for your reply - I am still getting errors:-

    Please Login or Register  to view this content.
    this comes up as a runtime error 91 - Object variable or With Block variable not set

    I have detailed the entire sub below again for info with your suggested code applied hopefully there is an easy solution to this but its got me if there is lol

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Multiple User Froms on Right Click event

    Ok..I think you are not right clicking on column 21 or 6. Try the following for column 1 and 2. Note that you must have userforms named "Userform1" and" Userform2". I tested this on a worksheet and it works when I click on column 1 or 2.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-15-2015
    Location
    England
    MS-Off Ver
    2016
    Posts
    25

    Re: Multiple User Froms on Right Click event

    Thank you so much this now works - I was definitely clicking on the correct columns before I even tried all of the columns to see if I'd made a mistake.

    Thank you again though really appreciate your help on this.

+ 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] ActiveX combobox click triggers unwanted another comboxbox click event
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 12-12-2015, 10:08 AM
  2. [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
  3. Capture user click event problem, "the expression you entered requires the control to
    By shinichi_nguyen in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 03-02-2012, 04:38 PM
  4. Insert n number of rows from a user form click event
    By vn900 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-15-2011, 08:37 PM
  5. Prevent ListBox Click Event Until Mouse Click
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2011, 12:23 PM
  6. userform label double-click goes to click event
    By John Paul Fullerton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2006, 01:00 PM
  7. Click event moves user to column W
    By ToferKing in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2006, 09:55 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