+ Reply to Thread
Results 1 to 15 of 15

show message data one time instead of every time and fixing

  1. #1
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    show message data one time instead of every time and fixing

    hello
    i have this code doesn't work very well as my condition it should show data based on col f =<14 days in my case it shows only 12 days as in my data it suposses showing also 8 days and 14 day as my condition and i would show one message show all data contain depending on condition like this
    name case due
    asd125 EXPIRED 12days
    asd126 LONG TERM 8days
    asd127 EXPIRED 14days
    asd128 LONG TERM 14days
    HTML Code: 
    Sub WorkSheet_Calculate()
    Dim LR As Long, i As Long, j As Long
    LR = Range("A" & Rows.Count).End(xlUp).Row
    For i = 2 To LR
        If Range("F" & i).Value <= 14 & Days Then
            MsgBox "..CONTRACT ALMOST ENDED.." & vbLf & vbLf & " Name : " & Range("B" & i).Value & "    " & "case : " & Range("c" & i).Value & "    " & "due : " & Range("f" & i).Value
            j = j + 1
        End If
    Next i
    If j = 0 Then MsgBox "No Renewal for today"
    End Sub
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    31,555

    Re: show message data one time instead of every time and fixing

    I think this
    Please Login or Register  to view this content.
    should be this
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    Thanks Trevor nothing changes

  4. #4
    Registered User
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    99

    Re: show message data one time instead of every time and fixing

    I didn't have time to finish this, but this file is a start. This was a real hurry up job, but it does most of what you want I think.
    You could also consider conditional formatting to format the cells depending on how many days are left.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    Thanks achammar but I would one message not many times show messages as I said it supposes showing all data applies condition

  6. #6
    Registered User
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    99

    Re: show message data one time instead of every time and fixing

    Oh, I think I see what you mean. Ok I don't have much time right now but give me a little while.... I might not get to it again tonight but I'll try.
    Last edited by achammar; 11-24-2020 at 09:42 PM.

  7. #7
    Registered User
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    99

    Re: show message data one time instead of every time and fixing

    Ok, try this file
    Attached Files Attached Files
    Last edited by achammar; 11-24-2020 at 09:59 PM.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    17,368

    Re: show message data one time instead of every time and fixing

    Try change to
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    Awesome ! @jindon can you make the code more arranging like the sheet the topics headers on top and the data under them

  10. #10
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    great @ Achammar could you show data message box like sheet the data under headers
    thanks again

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    17,368

    Re: show message data one time instead of every time and fixing

    Indent in message box properly is too hard and not worth to try...
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    Thanks again I would ask about direction showing message from right to left if is possible ,My office language is Arabic sometimes I make layout page from right to left but when run code it keep showing from left to right and then the data is reversing in showing the question is , is possible way to make showing data like the same sheet from right to left by change setting inside excel or by code ?

  13. #13
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013
    Posts
    17,368

    Re: show message data one time instead of every time and fixing

    No idea about Arabic showing from right to left in msgbox...

  14. #14
    Forum Contributor
    Join Date
    06-02-2019
    Location
    libya
    MS-Off Ver
    2010
    Posts
    463

    Re: show message data one time instead of every time and fixing

    many thanks Jindon & Achammar for your assistance and your time
    best regards,
    Abdelfattah

  15. #15
    Registered User
    Join Date
    01-02-2020
    Location
    Idaho, USA
    MS-Off Ver
    365
    Posts
    99

    Re: show message data one time instead of every time and fixing

    As Jindon mentioned, it would be difficult to format a message box to have aligned columns of data. Maybe this option will work for you. It creates a new sheet instead with the summary in it, then gives you the option to delete it if you don't want it.
    Or you can delete it at anytime.
    I don't know what right to left reading order looks like, so I couldn't do anything with that.
    Attached Files Attached Files

+ 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. fixing run time error 13 not show userform
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-30-2020, 06:32 AM
  2. Run message box when cell value time is exceed system time
    By tohobaby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2015, 02:50 AM
  3. [SOLVED] VBA code to show to message box between time range
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-15-2015, 06:00 PM
  4. Replies: 10
    Last Post: 11-08-2014, 04:51 PM
  5. how to make only message appear number of time before message does not show
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-06-2013, 07:30 PM
  6. Show Data Lables show Amount & Persentage at the same time
    By ComcoDG in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-29-2008, 04:54 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