Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-19-2015, 03:34 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default Vba with three click button help

GOOD AFTER NOON,
PLEASE MY DEAR


I am looking for Excel VBA three code counter that can count the number of expiry, EXPIRE WITHIN THE NEXT 30 DAYS list of date obtained by the name in an ROP expiry and msg box appearance if not word informed fill it at status when the name under expiry within next 30 days .
Date is now 19/09/2015
FRIST BUTTON Expiry---------------- fill back ground cell red
SECOND BUTTON EXPIRE WITHIN THE NEXT 30 DAYS----------fill back ground cell yellow
THREE SCECOND NOTICICATION …….. MsgBox("The rop licence for " & Name & " will expire in " & Diff & appearance if not word informed fill it at status when the name under expiry within next " days.", vbCritical, "Warning")
Attached Images
File Type: jpg PROJECT .JPG (52.3 KB, 25 views)
File Type: jpg expiry .JPG (36.9 KB, 24 views)
File Type: jpg expiry witn the next 30 days .JPG (39.5 KB, 25 views)
Reply With Quote
  #2  
Old 09-19-2015, 12:49 PM
charlesdh charlesdh is offline Vba with three  click button help Windows 7 32bit Vba with three  click button help Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

It may help if you attached a file for us to work with.
Reply With Quote
  #3  
Old 09-20-2015, 12:29 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default add attachment file

Quote:
Originally Posted by charlesdh View Post
Hi,

It may help if you attached a file for us to work with.
please help us .
Attached Files
File Type: xlsx ROP EXPIRY .xlsx (11.7 KB, 10 views)
Reply With Quote
  #4  
Old 09-20-2015, 11:20 AM
charlesdh charlesdh is offline Vba with three  click button help Windows 7 32bit Vba with three  click button help Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

For one of the buttons you have

Quote:
SECOND BUTTON EXPIRE WITHIN THE NEXT 30 DAYS----------fill back ground cell yellow
Should this not be "60" days instead of "30"?.
You already have a button fro "30".
Reply With Quote
  #5  
Old 09-20-2015, 12:45 PM
NoSparks NoSparks is offline Vba with three  click button help Windows 7 64bit Vba with three  click button help Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

I suspect the first button is supposed to be "Expired" rop licenses.

My question is about the third button.... "THREE SCECOND NOTICICATION"

Does the OP want a message box that automatically closes after 3 seconds?
Reply With Quote
  #6  
Old 09-20-2015, 04:06 PM
charlesdh charlesdh is offline Vba with three  click button help Windows 7 32bit Vba with three  click button help Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

NoSparks,

Good question. Perhaps the OP can give a better explanation of what they want.
Reply With Quote
  #7  
Old 09-20-2015, 11:41 PM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default

it is right needs message box when click at notification button . ROP can give a better explanation of what they want.

remarks :- if sheet user fill the word "informed" at status column if case expiry with next 30 days massage box not give explanation name & and rop license otherwise do it.
Reply With Quote
  #8  
Old 09-21-2015, 10:27 AM
charlesdh charlesdh is offline Vba with three  click button help Windows 7 32bit Vba with three  click button help Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

I have code for "Expired" and 30 day to expire.
No code for now on "Notification".
Attached Files
File Type: xlsm ROP EXPIRY-1.xlsm (19.5 KB, 11 views)
Reply With Quote
  #9  
Old 09-22-2015, 04:45 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default "Notification".

i appericate you too much you have done .
i mean you code on "Notification".
please browse attachment snap shot .
if you write like this code
Sub pop message _Click() '' notification
Dim i As Long
Dim expdate As String
Dim Edate As String
Edate = Format(Now(), "mm/dd/yyyy")
'' look for expired dates ''
For i = 2 To 9
If DateDiff("d", Cells(i, 2).Value, Edate) <= 30 Then
AND
ForEachcell In C2:C9
IfIsEmpty(cell) Then
cell.Value = MSGBOX
and fill cell with black ground white and word informed

End If
Next i
End Sub
Attached Images
File Type: jpg B notification .JPG (56.5 KB, 17 views)
File Type: jpg C .JPG (28.8 KB, 16 views)
Reply With Quote
  #10  
Old 09-22-2015, 09:22 AM
NoSparks NoSparks is offline Vba with three  click button help Windows 7 64bit Vba with three  click button help Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

If I understand what you want, and I'm not sure I do....
Perhaps something like this ?

Code:
Sub pop_message_Click()  ' notification
    Dim rng As Range
    Dim cel As Range
    Dim lastrow As Long
    Dim Licensee As String
    Dim msg1 As String, msg2 As String, msg3 As String

Application.ScreenUpdating = False

With Sheets("Sheet1")        '<~~ change to suit
    lastrow = .Cells(Rows.Count, "B").End(xlUp).Row
    Set rng = .Range("B2:B" & lastrow)
    msg1 = "THE ROP LINCENCE FOR MR" & vbCrLf & vbCrLf
    msg3 = vbCrLf & "EXPIRE WITHIN NEXT 30 DAYS"
    
    For Each cel In rng
        If cel.Value >= Date And cel.Value <= Date + 30 And cel.Offset(0, 1).Value <> "informed" Then
            Licensee = cel.Offset(0, -1).Value
            msg2 = msg2 & "      " & UCase(Licensee) & vbCrLf
            cel.Interior.ColorIndex = 0
            cel.Offset(0, 1).Value = "informed"
        End If
    Next cel
End With

If Len(msg2) > 0 Then MsgBox msg1 & msg2 & msg3, vbCritical, "Warning"
   
Application.ScreenUpdating = True

End Sub
Reply With Quote
  #11  
Old 09-22-2015, 09:51 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default

May you attche me the all code include notifation the same file
Reply With Quote
  #12  
Old 09-22-2015, 10:11 AM
NoSparks NoSparks is offline Vba with three  click button help Windows 7 64bit Vba with three  click button help Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

I use different regional settings than you so hope this works.
Attached Files
File Type: xlsm ROP EXPIRY_2 .xlsm (23.1 KB, 9 views)
Reply With Quote
  #13  
Old 09-22-2015, 11:00 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default

It is really professional job. That is else what I am looking for exactly.
You open my mind to other idea. No need to type write word “ informed” which become old fashion .
but you are deed which automatic come after click to pop message okay and use vba on purpose it .

You can say solved .
Reply With Quote
  #14  
Old 09-22-2015, 11:02 AM
poem poem is offline Vba with three  click button help Windows XP Vba with three  click button help Office 2007
Novice
Vba with three  click button help
 
Join Date: Jun 2015
Location: oman
Posts: 13
poem is on a distinguished road
Default

many thanks
Reply With Quote
  #15  
Old 09-22-2015, 11:20 AM
NoSparks NoSparks is offline Vba with three  click button help Windows 7 64bit Vba with three  click button help Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

Thanks for reporting back.

As you can see, with Excel, there is almost always more than one way to do anything.

Please mark this thread as solved. Thanks.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vba with three  click button help How to import excel calender data into outlook - with a click of a button levrone Excel 24 10-01-2021 05:33 AM
ActiveX Command Button disappears after click Bengt Word VBA 1 09-18-2013 12:42 PM
Animations on Button Click dvogler PowerPoint 1 03-01-2012 12:46 AM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
Button click event from a noob jsampson Outlook 0 10-12-2010 01:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft