+ Reply to Thread
Results 1 to 6 of 6

VBA Sub for leap year

  1. #1
    Registered User
    Join Date
    03-02-2016
    Location
    New York, USA
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    4

    VBA Sub for leap year

    I solved my problem!! All is well. Thank you for the help
    Last edited by farmust; 03-02-2016 at 02:55 PM. Reason: Problem solved

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Sub for leap year

    From Chip Pearson:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-02-2016
    Location
    New York, USA
    MS-Off Ver
    Microsoft Excel 2013
    Posts
    4

    Re: VBA Sub for leap year

    Thank you, I appreciate the help nonetheless.
    Last edited by farmust; 03-02-2016 at 02:56 PM.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,969

    Re: VBA Sub for leap year

    Explain what's in the textbox
    Ben Van Johnson

  5. #5
    Forum Contributor
    Join Date
    07-01-2009
    Location
    Maine, USA
    MS-Off Ver
    Excel 2016
    Posts
    161

    Re: VBA Sub for leap year

    Ddd requirements, but if you look at https://msdn.microsoft.com/en-us/lib.../ff839468.aspx, it shows you how to prompt the user for input. Taking that, and that you want MOD and ELSE/IF/ELSEIF statements, along with JBeaucaire's code, you can do it like this:

    Please Login or Register  to view this content.
    Now you just have to figure out how you want to 'activate' the code. To meet your ElseIF, you could just change the last section to

    Please Login or Register  to view this content.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Sub for leap year

    Farmust, please reinstate your post #1 question to make this thread usable by the community.

    And in the future, in exchange for the free help you get here, you would have been expected to POST your self-found solution.

+ 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. How to Know Leap Year?
    By IMA_Saihat in forum Tips and Tutorials
    Replies: 11
    Last Post: 04-05-2015, 03:17 PM
  2. How to Know Leap Year?
    By IMA_Saihat in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-05-2015, 03:17 PM
  3. How to check if a year in a cell is a leap year
    By Azuko in forum Excel General
    Replies: 2
    Last Post: 01-31-2014, 07:08 AM
  4. How to check if a year in a cell is a leap year
    By Azuko in forum Excel General
    Replies: 1
    Last Post: 01-27-2014, 03:20 AM
  5. Leap year
    By samirz10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2008, 06:11 PM
  6. Leap year
    By ianma in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-03-2008, 03:26 AM
  7. Leap Year
    By realsaggi in forum Excel General
    Replies: 6
    Last Post: 08-27-2007, 01:29 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