S
steveski
I have some code that steps through a Data Entry sheet and polls
column of dates (Column “I”). I get a “: Type mismatch: at the “Sdate
Cells(i, "I").Value” statement. If I go to the Data Entry sheet, selec
the entire column I, and format the cells as Date format, then the nex
time I run the code I will not get the error. However, the next time
run the code after that I will get the error again and I must go bac
and reformat the column to Date format. Do you have any ideas as t
what may be causing this? (I am using Excel 2000.)
Thanks.
Dim Sdate As Date
With Sheets("Data Entry").Range("PTSource")
LastRow = .Rows.Count
For i = 2 To LastRow
Sdate = Cells(i, "I").Value
Etc
column of dates (Column “I”). I get a “: Type mismatch: at the “Sdate
Cells(i, "I").Value” statement. If I go to the Data Entry sheet, selec
the entire column I, and format the cells as Date format, then the nex
time I run the code I will not get the error. However, the next time
run the code after that I will get the error again and I must go bac
and reformat the column to Date format. Do you have any ideas as t
what may be causing this? (I am using Excel 2000.)
Thanks.
Dim Sdate As Date
With Sheets("Data Entry").Range("PTSource")
LastRow = .Rows.Count
For i = 2 To LastRow
Sdate = Cells(i, "I").Value
Etc