#1   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default Can Anyone help.

Can anyone help me. i need a macro code for a project im working on.

the code i need is.

if date1 is not the same as date2 the it brings up a dialog message box to
inform you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
paul
 
Posts: n/a
Default Can Anyone help.

assuming the dates are shown in c9 and f9 at its most basic
Sub Macro1()
'
' Macro1 Macro
'

'
If Range("C9") < Range("F9") Then
MsgBox "Dates are not the same"
End If


End Sub
--
paul
remove nospam for email addy!



"John" wrote:

Can anyone help me. i need a macro code for a project im working on.

the code i need is.

if date1 is not the same as date2 the it brings up a dialog message box to
inform you.

  #3   Report Post  
Posted to microsoft.public.excel.misc
R.VENKATARAMAN
 
Posts: n/a
Default Can Anyone help.

date 1 and date 2 are in A1 and A2

use something like this sub

Public Sub test()
If Range("a2") < Range("a1") Then
MsgBox "the two dates are not same"
End If
End Sub

"John" wrote in message
...
Can anyone help me. i need a macro code for a project im working on.

the code i need is.

if date1 is not the same as date2 the it brings up a dialog message box to
inform you.



  #4   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default Can Anyone help.

The value ranges are in B2 to B3 on a sheet called Do Not Delete how would i
edit the macro code.

"R.VENKATARAMAN" wrote:

date 1 and date 2 are in A1 and A2

use something like this sub

Public Sub test()
If Range("a2") < Range("a1") Then
MsgBox "the two dates are not same"
End If
End Sub

"John" wrote in message
...
Can anyone help me. i need a macro code for a project im working on.

the code i need is.

if date1 is not the same as date2 the it brings up a dialog message box to
inform you.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"