if today is last day of month then, else

P

pswanie

sory little error on previous post


i got a macro to copy and special paste data in order to get a accumalative
sales data. i want to add to it so that it check if today is the last day of
the month.

something like

if now() = lastday of month then
range a1.value =""
else
run mymacro
end if


thanx
Phillip
 
R

Rick Rothstein \(MVP - VB\)

My answer will be the same as in my previous posting... put your code in the
appropriate section of the If-Then-Else blocks (just read the comments to
see which block does what).

Also, for future reference, it is better to keep follow up postings in the
same thread as the original posting appeared in.

Rick
 
P

pswanie

jip all that worked but... i only later noticed and relized that it should
be if today is the first day of the month
 
R

Rick Rothstein \(MVP - VB\)

If Day(Date) = 1 Then
' << Today is the first day of the month >>
Else
' << Today is not the last day of the month >>
End If

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top