+ Reply to Thread
Results 1 to 2 of 2

Thread: Run sub from button

  1. #1
    Registered User
    Join Date
    09-20-2009
    Location
    Melton Mowbray, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Run sub from button

    Hi I'm having trouble running a sub I've written. The sub works, I made the form and a button named new number as the sub is call newNumber(). I've tried:

    Private Sub CommandButton3_Click()
    call newNumber()
    End Sub
    With no luck, having a blonde moment please help?

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,155

    Re: Run sub from button

    If the only purpose of the Command Button is to run the sub routine, why not put the code for the sub routine directly associated with the Command Button instead of calling the subroutine.

    BTW--where is the subroutine located? Is it in your modules? That may be the issue.

    Alan

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0