+ Reply to Thread
Results 1 to 3 of 3

VBA Command Button not working

  1. #1
    Registered User
    Join Date
    06-14-2017
    Location
    Phoenix, Arizona
    MS-Off Ver
    2013
    Posts
    1

    Question VBA Command Button not working

    I created a command button with a VBA code to print invoices for clients. Yesterday, when I clicked the button it worked, but now when I click the button nothing happens. I have tried all the fixes. I have deleted the button and reset it. I have gone into the VBA design mode and tried running the code from there. Nothing happens.



    I can't figure out why. I have updated, ran the fix from Microsoft, deleted the .exd files, and still nothing. Can someone please help? Here is a copy of the code I wrote.



    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 06-14-2017 at 02:45 PM.

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

    Re: VBA Command Button not working

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

    You need to step through the macro to see where it fails.

    Instead of clicking on the button, move the macro to a normal macro module.

    Then select the developer tab and then macros.

    Select "Step into Macro" and then f8 to stem through your macro.
    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.

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Command Button not working

    The behavior could be explained if there are fewer than 10 rows in "June 2017 SL Fees". If you run the code directly from the VBA editor and it still doesn't do anything, the problem is not with your button. Also see if the code is even trying to run--as a quick diagnostic I suggest putting this line just before the For statement:

    Please Login or Register  to view this content.
    If the message box doesn't appear then your code is not even running. But if it does appear, the problem will likely be evident in the message.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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] Active X Command Button not working
    By gassiusmax in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2015, 01:29 PM
  2. Command Button Stops Working After First Use
    By OpieWinston in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2014, 06:55 PM
  3. Command Button Not working in new file
    By Fletch74 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-05-2013, 11:41 PM
  4. Command button code not working
    By mariposa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2011, 05:03 AM
  5. Command button is not working by using VBA
    By Webtekr in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 03-28-2009, 02:22 AM
  6. Command button not working properly on different sheet
    By Strikez in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2007, 12:36 AM
  7. command button isn't working
    By Nydia in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-29-2005, 06:06 PM

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