vba: How do I write a "For Each Statement" nested in a "With Statement"?

M

Mcasteel

Dim strReportDate As String
strReportDate = InputBox("Please Enter Report Date:", "Get Dail
Report:")

Dim dtReportDate As Date
dtReportDate = DateValue(Date:=strReportDate
 
F

Frank Kabel

Hi
then your statement can't work. you may try something along the lines
'...
Dim cell as range
for each cell in rng
if cell.value=dtReportDate then
'do something
end if
next
'...
 

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