I am looking to get my vb code to do a simple thing, i need it to look at a date on my excel doc and to flag a messagebox that it cannot run due to date passed only if the date is exceeded otherwise i would like the code to complete?? I am very new to all this also
If Now >= cell value"e8" Then MsgBox "Cannot Submit Form" Else
'create the text file
Open strFile For Output As intFile
'Start going through list
intRowCount = 17
With Sheets("DevSlots")
Do Until .Cells(intRowCount, 1) = ""
Time = .Cells(intRowCount, 2)
SchedDate = .Cells(intRowCount, 3)
EndTime = .Cells(intRowCount, 4)
For colIndex = 6 To 45
If .Cells(intRowCount, colIndex).Value = "" Then
Else: Print #intFile, .Cells(intRowCount, colIndex) & "|" & "DevSlot" & "|" & Format(SchedDate, "YYYYMMDD") & "|" & Format(Time, "hh:mm") & "|" & Format(EndTime, "hh:mm")
End If
Next colIndex
intRowCount = intRowCount + 1
Loop
End With
Close intFile
End Sub
Bookmarks