View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] sailor4life61@yahoo.com is offline
external usenet poster
 
Posts: 7
Default Check that date exists

Hello
My code opens daily files on a (monthly basis) and pastes data into my
workbook. There should be at least one line of data for each day and
the date is in column A stating on row 3. I would like to have a
message via a popup box ("Data does not exist for mm/dd") if a day is
not represented in Column A. How can this be accomplished?

Also, I am using an input box as follows:

sMonth = InputBox("Please Enter Reporting Month")
sYear = InputBox("Please Enter Reporting Year")


With Sheets("Data")
.Range("B1").Value = sMonth
.Range("A1").Value = sYear
End With

This works, however I would like the month fomatted as MM and
currently is is formatted as M.

Thanks!