RE:Problema con WeekDay en win vista
Mira lo que tengo entendido que al principio vb6 y vista no eran compatibles, despues lo mejoraron y solo fallaba en las primeras versiones de vista. Conclusion que todo quedo inconcluso.
Solucion? hacerte tu propia funcion weekday. mira te enconte un ejemplo
Public Function DOW(ByVal GregDate As Date) As String
' Return values:
' 0 = Sunday
' 1 = Monday
' 2 = Tuesday
' 3 = Wednesday
' 4 = Thursday
' 5 = Friday
' 6 = Saturday
Dim y As Integer
Dim m As Integer
Dim d As Integer
' monthdays:
' This is a "template" for a year. Each number
' stands for a day of the week. The general idea
' is that, in a standard year, if Jan 1 is on a
' Friday, then Feb 1 will be a Monday, Mar 1
' will be a Monday, April 1 will be a Thursday,
' May 1 will be Saturday, etc..
Dim mcode As String
Dim monthdays() As String
monthdays = Split("5 1 1 4 6 2 4 0 3 5 1 3")
' Grab our date info
y = Val(Format(GregDate, "yyyy"))
m = Val(Format(GregDate, "mm"))
d = Val(Format(GregDate, "dd"))
' Snatch the corresponding month code
mcode = Val(monthdays(m - 1))
' Multiplying by 1.25 takes care of leap years,
' but not completely. Jan and Feb of a leap year
' will end up a day extra.
' The 'mod 7' gives us our day.
DOW = ((Int(y * 1.25) + mcode + d) Mod 7)
' This takes care of leap year Jan and Feb days.
If y Mod 4 = 0 And m < 3 Then DOW = (DOW + 6) Mod 7
End Function
suerte amigo.-