pepe90
08-05-2011, 08:41 AM
Hello,
I'm having some problems using the Date function on VB for Excel 2007.
In the following code:
Private Sub aceptar_Click()
Dim fila As Integer
With Sheets("DATOS")
.Cells(fila, 10) = Date
End With
end Sub
It shows an error that marks the Date function and says that doesn't find the proyect or library. So I tested the function on another workbook that says:
Sub fecha()
Cells(1, 2) = Date
End Sub
and it worked just fine. The only difference I see between the code is that the first one is on a UserForm module and references the worksheet. Any idea whats going on?
I'm having some problems using the Date function on VB for Excel 2007.
In the following code:
Private Sub aceptar_Click()
Dim fila As Integer
With Sheets("DATOS")
.Cells(fila, 10) = Date
End With
end Sub
It shows an error that marks the Date function and says that doesn't find the proyect or library. So I tested the function on another workbook that says:
Sub fecha()
Cells(1, 2) = Date
End Sub
and it worked just fine. The only difference I see between the code is that the first one is on a UserForm module and references the worksheet. Any idea whats going on?