+ Reply to Thread
Results 1 to 5 of 5

Button not working through VBA

  1. #1
    Registered User
    Join Date
    01-28-2016
    Location
    Surrey, UK
    MS-Off Ver
    2010
    Posts
    14

    Button not working through VBA

    Hi

    Please can someone help, I have created a button on my worksheet, however the code behind it stops half way and wont run through both my Subs.
    Here is my code below:
    The button only runs 'importData' and not the 'createpivottable

    Please Login or Register  to view this content.


    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

    Thanks
    S
    Last edited by alansidman; 02-25-2016 at 12:00 PM. Reason: code tags added

  2. #2
    Registered User
    Join Date
    01-28-2016
    Location
    Surrey, UK
    MS-Off Ver
    2010
    Posts
    14

    Re: Button not working through VBA

    Found the answer!! Spelling mistake

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Button not working through VBA

    To avoid such problems add Option Explicit at the top of the module.

    PS Can you add code tags when posting code?
    If posting code please use code tags, see here.

  4. #4
    Registered User
    Join Date
    01-28-2016
    Location
    Surrey, UK
    MS-Off Ver
    2010
    Posts
    14

    Re: Button not working through VBA

    Apologies, will do next time.

    Thanks

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2509 Win 11
    Posts
    25,002

    Re: Button not working through VBA

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Why is my previous button only working once?
    By frontypro4x in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-15-2015, 07:21 PM
  2. [SOLVED] Button stopped working
    By bxk006 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2015, 06:12 PM
  3. [SOLVED] Help me Submit Button not working :(
    By vijaynadiad in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-01-2013, 01:10 PM
  4. ActveX Control Button Not Working But Form Control Button is
    By MikeTruth in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2012, 05:04 AM
  5. Working with a button array
    By Jazzzbo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-03-2011, 04:00 PM
  6. Option button:working
    By GogsJames in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2006, 05:11 AM
  7. [SOLVED] Mouse right button not working
    By Jerry S in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2005, 09:06 PM

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