View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default How do I write a "For Each Statement" nested in a "With Statement"?

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
'...

--
Regards
Frank Kabel
Frankfurt, Germany

"Mcasteel" schrieb im
Newsbeitrag ...

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

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


--
Mcasteel
---------------------------------------------------------------------

---
Mcasteel's Profile:

http://www.excelforum.com/member.php...o&userid=15698
View this thread:

http://www.excelforum.com/showthread...hreadid=276390