+ Reply to Thread
Results 1 to 42 of 42

Warning pop up for expired dates

  1. #1
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Warning pop up for expired dates

    Hello

    I have a workbook with many sheets and many userforms . I call all the userforms from the first sheet calling "Application"

    In sheet 13, starting in column BU i have a "table" of data.

    What i need is when i open my workbook a pop up message should appears showing to me all the data of that table that date of column BX, will expired in next 7 days and another one that will show the data that will expire in next 15 days.

    I found this that does what i need but unforunately i am not able to modify as per my needs.

    http://www.excelforum.com/excel-prog...te-pop-up.html

    Thanks in advance for any assistance here.
    Attached Files Attached Files

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

    Re: Warning pop up for expired dates

    See if the attached is any help.
    Attached Files Attached Files
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Warning pop up for expired dates

    Pl see attached file with buttons to select required data.
    Attached Files Attached Files

  4. #4
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Thanks to both of you.

    Mr Norie. This does exactly as i want the job.

    Unfortunately in my real workbook(which is EXACTLY as my sample) gives me an Error

    "Run-time Error "9"
    subcript out of range.

    http://screencast.com/t/8kOdFIGqo

    even if i try to open it with a button OR pressing F5 from the userform module.

    Any idea why??

    kvsrinivasamurthy


    Thank you but Mr Norie's way is the one that i want to go. Do you have any suggestion for a way like that?

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

    Re: Warning pop up for expired dates

    I created a table from the data on sheet '13' and that's used in the code.

    I think the problem is because you don't have that table.

    I used a table to make things a little easier but the code can easily be changed to use the data as it is.

  6. #6
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    I just noticed some data in columns A:C, in sheet 13. Is this what you mean?

    But even the answer is yes, i am not able to understand how this works.
    ..but the code can easily be changed to use the data as it is.
    Have you the time to work with this pls?

    Also is there a possibility to don't work because i get the data in sheet 13 using an advanced filter?

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

    Re: Warning pop up for expired dates

    I didn't add any data.

    I removed the filter and converted the data to a table, just to make it easier to code.

    It should be straightforward to adjust the code to work without table, but if the data is going to be filtered then that's going to cause problems.

    Any filter would need to be removed so all the data is shown.

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Warning pop up for expired dates

    Maria.

    You had some typed data in your sample workbooK(See your first attachment).

    What Norie means is that he created a table with your data in sheet 13.

    See in the link below how you can create a table.

    http://www.excel-easy.com/data-analysis/tables.html

    I don't know if you have any other data in sheet 13 and if you'll have any other problem(for example because you get your data using an advanced filter) but Norie's solution works great if you make a table there..
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  9. #9
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Thanks Mr Fotis.

    Ok i am an idiot!! I hadn't understand what Mr Norie told about Table)...

    Yes now it works(Thank you Mr Norie!!) in my real workbook too BUT looks that Table does not works together with advanced filter(as you mentioned!!) so that table does not include any new data that i add.

    So Mr Norie can you pls offer a solution without to use a Table?

  10. #10
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Warning pop up for expired dates

    I was expected something like that....

    Let's hope that Norie or someone else will be able to offer a suggestion for this!

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    Do you need the filter?

  12. #12
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Hoping that i understabd well your question.

    No sir. I don't need an Auto filter in my range as my first attachment.

    http://screencast.com/t/ypEae255oqv

    I saw the autofilter in your attachment

    http://screencast.com/t/aBiPB7h4b

    and thought that is a part of your solution.

    Only to remind that i get these data using an advanced filter. I hope to reply correct in your question.

    Thank you for trying to help me.

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

    Re: Warning pop up for expired dates

    Sorry I'm confused.

    I didn't put any filter on the data, and the code I created doesn't either.

    The filter was in the original workbook and I had to remove it to so I could access all the data.

    What do you mean you get the data using an advanced filter?

  14. #14
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    I am comfused too so i upload a new sample workbook which is exactly as the original.

    I use this code to get my results(i show to my sample too)

    Please Login or Register  to view this content.

    I hope everything to be ok now!
    Attached Files Attached Files

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

    Re: Warning pop up for expired dates

    See the attached, it works without using table.
    Attached Files Attached Files

  16. #16
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Thank you again.

    In my real workbook i get only results for ALL when i open the userform but this includes range AU:BZ of my sheet.

    http://screencast.com/t/bkKZgYtYeht

    If i click on 7 or 15 days option i get an error..

    http://screencast.com/t/1cqXV93R

    i am sorry if i am a pain for you but i just say what happens...

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

    Re: Warning pop up for expired dates

    How are you transferring things, ie the code and userform, over to the real workbook?

    Can you upload an example of the real workbook, without any sensitive data, with the userform and code in it?

  18. #18
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    i copy your userform in my workbook as it is.

  19. #19
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Here it is

    Use userform 59_2 to get your data in BU column.

    Userform 100 is your userform.
    Last edited by Fotis1991; 03-27-2014 at 11:59 AM.

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

    Re: Warning pop up for expired dates

    Try this, I've tested it on your last uploaded file and it seems to work OK.
    Attached Files Attached Files

  21. #21
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    We are near...! I am feeling.. Thank you so much!!

    Works for the ALL option, but when i choose the other 2 options i get 1 result and not 2 as should be the correct result. Pict is from the orig workbook that i uploaded.

    http://screencast.com/t/m8Zq2Rpxqr

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

    Re: Warning pop up for expired dates

    Isn't it the due date you want to check?

  23. #23
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Yes. Column BX.

    I have 2 dates(30/03/2014 AND 31/03/2014) there that must appear.

    14/3/2014 20691616-7 Eurobank 30/03/2014 c 1723
    29/1/2014 00003423-1 Πειραιώς 31/03/2014 c 2704,62

    and i see only the second one as i show in the picture.

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

    Re: Warning pop up for expired dates

    Are you sure those are 'real' date values?

    Usually date values, like numbers are aligned to the right not the left.

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

    Re: Warning pop up for expired dates

    Remove this line from the code.
    Please Login or Register  to view this content.

  26. #26
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    You are right BUT even if i have real dates(look at the formula bar) i get the same result.

    http://screencast.com/t/dGXcRmEEjs

  27. #27
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Quote Originally Posted by Norie View Post
    Remove this line from the code.
    Please Login or Register  to view this content.
    Yes yes yes!! That is!!! Thank you so much!!!

    When and if have the time 2 more questions.

    If i want to create another user form -let's say using the data in range BB:BH, which part of the code must modify?

    If i want when i open your userform to get as results the 7 days results and not the ALL, what i have to change there!!

    Thanks again so much!!

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

    Re: Warning pop up for expired dates

    What would this other userform do exactly?

    To have the data filtered for 7 days when it opens add this to the bottom of the Initialize sub.

    Please Login or Register  to view this content.

  29. #29
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    ..What would this other userform do exactly?
    EXACTLY the same job as the one that you offered me. The one that you offered is for the import checks and the one that i want to create is for the export checks.

    In range BB:BH the due date column is the BE column.

    I just arrived home so i am not able to test your suggestion for 7 days default but i am sure that will work!

  30. #30
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    Does it need to be another form?

  31. #31
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Good morning(08:45 am here!)

    Please Login or Register  to view this content.
    Of course this works great!

    ..Does it need to be another form?
    I believe so because this report is different from the other(in fact completely oppsite).

    But if you have something else in your mind i am "open" to see it!

    .and adding 1 more question, is it possible to see the headers in userform?

  32. #32
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    I thought you said this new form would do exactly the same as the existing one?

    I was thinking of either having something on the form where the user could pick import/export and the listbox would be populated based on that choice.

    As for headers, we could have them in the listbox but it would mean losing the main functionality of the form.

    I do have an alternative option though - a small listbox located just above the main listbox.

    This listbox would contain the headers.
    Last edited by Norie; 03-28-2014 at 08:57 AM.

  33. #33
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    ..I thought you said this new form would do exactly the same as the existing one?
    YES. But the results are different as we'll use another range.

    Range BU:..is a report for the checks that our suppliers should pay to us.

    The other one that i need to built getting the results from range BB:BH, will be a report for the checks that we have to pay to our suppliers.

    EXACTLY same logic for different reason.

    That's why my question is which part of your code should modify to get the results that i need in different userform and also because i want to learn how to do this alone. Perhaps a month later to want to create such a userform from a different range too...

    I did a new listbox for the headers and works great. Thank you.

  34. #34
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Warning pop up for expired dates

    Maria

    Change the range in this part of Norie's code and tell us what happens.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

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

    Re: Warning pop up for expired dates

    Fotis

    Why AU?

    The OP says the 2nd range is for columns BB:BH.

  36. #36
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Warning pop up for expired dates

    Quote Originally Posted by Norie View Post
    Fotis

    Why AU?

    The OP says the 2nd range is for columns BB:BH.
    Right Norie

    I did some tests and i used range AU of yesterdays Maria's workbook and sees that works so i posted the suggestion for this range. Apologize.

    The important is: Does is correct on NO? I ask you because everybody knows here that my VBA skills are limited!!

  37. #37
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645
    I'M sure using AU will work but the OP did specify BB:BH.

    I suppose we'll just need to wait for the OP to post.

  38. #38
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    I really feel to be an idiot!!

    What can i say..??

    Mr Norie thanks for your solution and your patient!! I really appreciate this!!

    Mr Foti. You are my angel!! Thank you very much for all your help that you offer to me!!

    Mr Norie, the system does not allows me to give a rep! I'll ought it to you!!

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

    Re: Warning pop up for expired dates

    I'm totally confused now - is the range for columns BB:BH or is it AU:AZ?

  40. #40
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Warning pop up for expired dates

    Mr Norie you are right.

    I asked for range BB:BH.

    I tried in range AU:AZ as Mr Fotis suggested and works great. So i believe that will work also foR range AU:AZ as i asked. I don't believe that will have a problem as i am not able to tst it just now. Do you believe that i'll have problem with this?

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

    Re: Warning pop up for expired dates

    There appears to be a lot more data in columns AU:AZ than there is in BB:BH.

    Also the 2 sets of data don't seem to match.

    Since it's not my data I don't know if that's a problem.

  42. #42
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Warning pop up for expired dates

    Quote Originally Posted by MariaPap View Post
    I really feel to be an idiot!!

    What can i say..??
    No worries my child!!

    You are just too young!! Keep trying!! You do good job.

    By the way:Norie's Code will work for range BB too. I have tested it!

+ 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. Extrating Expired Dates
    By sdehod in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2014, 11:51 AM
  2. Using a function for expired dates
    By jdarrow in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-24-2011, 07:25 PM
  3. [SOLVED] Expired Dates
    By Axel in forum Excel General
    Replies: 6
    Last Post: 11-23-2005, 09:55 PM
  4. Warning! Time has expired....
    By yh73090 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-09-2005, 06:18 PM
  5. Output of expired dates
    By matteo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2005, 07:45 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