close

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.

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

'
If Range(quot;C9quot;) lt;gt; Range(quot;F9quot;) Then
MsgBox quot;Dates are not the samequot;
End IfEnd Sub
--
paul
remove nospam for email addy!
quot;Johnquot; wrote:

gt; Can anyone help me. i need a macro code for a project im working on.
gt;
gt; the code i need is.
gt;
gt; if date1 is not the same as date2 the it brings up a dialog message box to
gt; inform you.

date 1 and date 2 are in A1 and A2

use something like this sub

Public Sub test()
If Range(quot;a2quot;) lt;gt; Range(quot;a1quot;) Then
MsgBox quot;the two dates are not samequot;
End If
End Sub

quot;Johnquot; gt; wrote in message
...
gt; Can anyone help me. i need a macro code for a project im working on.
gt;
gt; the code i need is.
gt;
gt; if date1 is not the same as date2 the it brings up a dialog message box to
gt; inform you.
The value ranges are in B2 to B3 on a sheet called Do Not Delete how would i
edit the macro code.

quot;R.VENKATARAMANquot; wrote:

gt; date 1 and date 2 are in A1 and A2
gt;
gt; use something like this sub
gt;
gt; Public Sub test()
gt; If Range(quot;a2quot;) lt;gt; Range(quot;a1quot;) Then
gt; MsgBox quot;the two dates are not samequot;
gt; End If
gt; End Sub
gt;
gt; quot;Johnquot; gt; wrote in message
gt; ...
gt; gt; Can anyone help me. i need a macro code for a project im working on.
gt; gt;
gt; gt; the code i need is.
gt; gt;
gt; gt; if date1 is not the same as date2 the it brings up a dialog message box to
gt; gt; inform you.
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()