+ Reply to Thread
Results 1 to 5 of 5

Error check for Start date & End date in a macro

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003
    Posts
    93

    Error check for Start date & End date in a macro

    Hello everyone,

    I have attached an excel file which contains a macro.
    What i am trying to do is this:
    When i run the macro it will ask for Start date and End date .
    Then it will delete all rows for dates < Start date and > End date.
    Till here it is working fine.

    Problem is :
    I want to do error check ie.
    if the user keeps the Start date or End date blank
    OR
    if End date < Start date
    OR
    if CANCEL button is clicked

    what should be done ?

    Pls help

    Regds
    Kmahesh
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Error check for Start date & End date in a macro

    Please Login or Register  to view this content.
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Error check for Start date & End date in a macro

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    09-21-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2003
    Posts
    93

    Re: Error check for Start date & End date in a macro

    Thanks Haripopuri & Patel45 ,
    both the solutions are working

  5. #5
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Error check for Start date & End date in a macro

    Glad we could help. You might consider showing your respect to the person who helped you by clicking on star button at the bottom of the post.

+ 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. Replies: 1
    Last Post: 05-26-2014, 03:46 AM
  2. Help required with developing a error msgbox when end date is before start date
    By Graeme Smith in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2013, 11:56 PM
  3. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  4. Replies: 2
    Last Post: 01-04-2012, 09:15 AM
  5. Replies: 7
    Last Post: 11-16-2008, 05:48 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