date range

S

SangelNet

hi guys

is used a code from the following post:

http://groups.google.com/group/micr...?lnk=gst&q=date+range+lookup#ee0f78d621af00bb

modified it, and i got this

Sub daterange(Optional eta As Date)


today = DateSerial(2007, 1, 1)
For Each cell In Range("H8:H10")
If cell.Value <> "" Then
If cell.Value = today Then
sStr = sStr & cell.Offset(0, -6).Value & vbNewLine
End If
End If
Next
If sStr <> "" Then
MsgBox sStr
End If
End Sub

not en expert and dont know how to establish and make today = "todays
date"

how do i establish that ?
 
S

SangelNet

I always say, the simplest things get you.

Thnx Gary

Is there a way to make this work with a calender object, so that when
you click a date the macro searches based on the clicked date?
 

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

Similar Threads

cant see the macro 3
Delete part of cell value 2
Delete part of cell value 1
active row copy into Outlook 0
Code not working 3
Combobox date value matching 0
Object range failed 1
Combining Procedures into Loop 3

Top