+ Reply to Thread
Results 1 to 11 of 11

Click Button does not work

  1. #1
    Registered User
    Join Date
    04-17-2019
    Location
    Jersey
    MS-Off Ver
    365
    Posts
    17

    Click Button does not work

    Hi.

    I have successfully created a Macro that calculates all the entries in a row by colour

    I have noticed that to get the total I have to go to each cell, place my cursor in the view pain and hit return

    I've created a click button and assigned the macro to the button but this does not work.

    Can anyone help with what I'm doing wrong?

    Thanks in advance

    Craig

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Click Button does not work

    Perhaps post your code? ( with code tags)

  3. #3
    Registered User
    Join Date
    04-17-2019
    Location
    Jersey
    MS-Off Ver
    365
    Posts
    17

    Re: Click Button does not work

    Hi

    Not sure what code tags are but here goes. (assuming code tags are # or [ and ]

    Hopefully this helps explain what I've done




    Please Login or Register  to view this content.
    Last edited by Craig_Foggo; 04-23-2020 at 12:20 PM.

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Click Button does not work

    If you take a moment to read forum rules you will see what code tags are.
    Please add them
    Last edited by Pepe Le Mokko; 04-23-2020 at 12:45 PM. Reason: Tags added by OP

  5. #5
    Registered User
    Join Date
    04-17-2019
    Location
    Jersey
    MS-Off Ver
    365
    Posts
    17

    Re: Click Button does not work

    Hi

    After reading the rules I'm assuming the code tags are a# or [ and ]

    Hope this is what is required.

    Thanks

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Click Button does not work

    Edit your post, select the code and click the #button to wrap the code with tags

  7. #7
    Registered User
    Join Date
    04-17-2019
    Location
    Jersey
    MS-Off Ver
    365
    Posts
    17

    Re: Click Button does not work

    Excellent thank you.

  8. #8
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: Click Button does not work

    You're welcome

  9. #9
    Registered User
    Join Date
    04-17-2019
    Location
    Jersey
    MS-Off Ver
    365
    Posts
    17

    Re: Click Button does not work

    Code Tags added. Can anyone help please?

    Thanks in advance

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    Re: Click Button does not work

    you are calling a sub and ending it immediately
    remove that and call your function.

  11. #11
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Click Button does not work

    Ignoring that this is not an optimal approach to begin with (colours should really be used to reflect data, not as data), you should make your function volatile:

    Please Login or Register  to view this content.
    so that it will recalculate when the workbook does, for whatever reason. Changing a cell colour will never trigger a recalculation, but once the function is volatile, pressing f9 should recalculate it.
    Rory

+ 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. VBA Button click on HTML Object does not work
    By hinmi1905 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2019, 02:58 PM
  2. Replies: 2
    Last Post: 01-09-2018, 11:39 AM
  3. Replies: 1
    Last Post: 10-12-2016, 04:00 PM
  4. VBA work when I click on Play Button, But not when opening the file
    By marcarmstrong in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2016, 08:50 AM
  5. 1 week work schedule = auto change date with button click
    By justspiffy in forum Excel General
    Replies: 10
    Last Post: 03-30-2015, 12:27 PM
  6. [SOLVED] Code working when using F8, but doesnt work properly through button click.
    By emilyloz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-01-2013, 09:58 AM
  7. Macro Button does not work on second click
    By retseort in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-09-2005, 06:12 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