+ Reply to Thread
Results 1 to 2 of 2

how to access a doubleclick, need to call it from another macro

Hybrid View

dmcgov how to access a doubleclick,... 02-21-2019, 08:39 AM
mehmetcik Re: how to access a... 02-21-2019, 09:18 AM
  1. #1
    Valued Forum Contributor dmcgov's Avatar
    Join Date
    11-11-2015
    Location
    Florida, USA
    MS-Off Ver
    Office 365 Business
    Posts
    1,518

    how to access a doubleclick, need to call it from another macro

    i have the following:

    Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    UserForm2.Show
    TextBox1.Value = UserForm2.TextBox1.Value
    that works. now i want to call the dblclick from another macro, how can i do that?

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: how to access a doubleclick, need to call it from another macro

    If your Macro is

    Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    UserForm2.Show
    TextBox1.Value = UserForm2.TextBox1.Value
    End Sub
    Then Create a new Macro in a normal Macro Module.

    Sub TDC()
    UserForm2.Show
    TextBox1.Value = UserForm2.TextBox1.Value
    End Sub
    Modify your Macro to:-

    Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
    TDC
    End Sub

    So now you can call the Macro using: TDC

    For example:

    Sub Macro1()
    TDC
    End Sub
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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] Method to Call a VBA macro Book from Access Userform
    By Parth007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2015, 06:04 AM
  2. [SOLVED] Macro to Highlight ActiveRow w/ DoubleClick
    By Kehoth01 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-23-2014, 11:37 AM
  3. DoubleClick Macro giving error on other computers
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2013, 01:20 PM
  4. [SOLVED] Open listbox and doubleclick one line and run macro
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2013, 12:33 PM
  5. Use excel vba to Call macro from Access
    By ppyxl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2006, 12:30 PM
  6. Excel vba to call Access Macro
    By ppyxl in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-06-2006, 09:42 AM
  7. Excel vba to call Access Macro
    By ppyxl in forum Excel General
    Replies: 0
    Last Post: 07-06-2006, 09:41 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