View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Code is not detecting the date.

Why are you declaring fromdate as a string???

"Heera" wrote:

Hi,

Here is my code.

The value in "C12" range is a date but my loop is not able to detect
the date in the column.


Sub RamPlan()

Workbooks("Ramp Plan Macro.xls").Activate
Sheets("Macro").Select

Dim fromdate As String

fromdate = Range("c12").Value

Windows(hirename).Activate
Sheets("C LLC").Select
Range("A2").Select

Do Until Selection.Value = "fromdate"
Selection.Offset(1, 0).Select
Loop