+ Reply to Thread
Results 1 to 9 of 9

How enable a button if Thursday

  1. #1
    Registered User
    Join Date
    07-25-2010
    Location
    Bangladesh
    MS-Off Ver
    Excel 2003
    Posts
    7

    How enable a button if Thursday

    I want to enable a button of excel sheet if my system day is Thursday. All other day the button will be disabled. Only every Thursday the button will be enable. How to do this?

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How enable a button if Thursday

    Something like
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-25-2010
    Location
    Bangladesh
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How enable a button if Thursday

    Quote Originally Posted by jindon View Post
    Something like
    Please Login or Register  to view this content.
    Dear jindon bro your code works fine. Is there any way the button enable on every Thursday and after click the it will be disable for next Thursday?

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: How enable a button if Thursday

    This in thisworkbook.
    Please Login or Register  to view this content.
    and this at the end of your code attached to the commandbutton.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    07-25-2010
    Location
    Bangladesh
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How enable a button if Thursday

    bakerman2,

    Not works bro. I want my command button will be enable for one click for Thursday only. After one click my button will be disable for next Thursday for one click.
    Last edited by jeffreybrown; 03-30-2019 at 06:19 AM. Reason: Removed quote!

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: How enable a button if Thursday

    Does works bro. Test example file.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: How enable a button if Thursday

    dcmphi,

    1) Prepare 1 very hidden sheet named like "HiddenSheet".
    2) Workbook_Open event code
    Please Login or Register  to view this content.
    3) Click event code
    Please Login or Register  to view this content.
    So that the CommandButton will be disabled after the click even you reopen on Thursday again.
    Last edited by jindon; 03-30-2019 at 06:10 AM.

  8. #8
    Registered User
    Join Date
    07-25-2010
    Location
    Bangladesh
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How enable a button if Thursday

    Quote Originally Posted by bakerman2 View Post
    Does works bro. Test example file.
    Deart bakerman2 thanks for your replay.
    But I mean every Thursday the button will be enable for one click even if you reopen the workbook again on Thursday the button will not be enable until next Thursday.

  9. #9
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: How enable a button if Thursday

    Yes, the penny dropped.

    Check Jindon's code in Post#7.

+ 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. Checkboxes to enable button
    By ryryAP2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-13-2014, 08:21 PM
  2. Replies: 1
    Last Post: 07-13-2014, 09:37 AM
  3. [SOLVED] Button enable and disable...
    By Will03 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2013, 10:00 AM
  4. Replies: 5
    Last Post: 01-08-2013, 11:38 AM
  5. [SOLVED] enable a disabled button
    By CharlieZangel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2012, 07:32 PM
  6. Command button Enable using VBA
    By psatkar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2006, 05:50 AM
  7. Enable Command Button 1 & 2
    By Mikeice in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2005, 01:01 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