G
Guest
Hi,
i have this function showed:
Private Sub T1ano_Enter()
Dim x, y, t
Dim anoa As Long
Dim adaqui As Long
Dim dias As Long
Dim perc As Long
Dim vcomp As Long
Set anoa = Me.Tanoactual.Value
Set adaqui = Me.Tanodataaquisicao.Value
Set dias = Me.Tcaixadias.Value
Set perc = Me.Tpercentagem.Value
Set vcomp = Me.Tvalorcompra.Value
Set t = Me.T1ano
'If anoa = adaqui Then
' x = (dias / 365)
' y = (perc * vcomp)
' t = x * y
'Else
' t = "0"
'End If
End Sub
when i'm start to ru nalways show this error message "Object required error"
and open VBA and put the cursor in the set variable!
thanks for any help.
i have this function showed:
Private Sub T1ano_Enter()
Dim x, y, t
Dim anoa As Long
Dim adaqui As Long
Dim dias As Long
Dim perc As Long
Dim vcomp As Long
Set anoa = Me.Tanoactual.Value
Set adaqui = Me.Tanodataaquisicao.Value
Set dias = Me.Tcaixadias.Value
Set perc = Me.Tpercentagem.Value
Set vcomp = Me.Tvalorcompra.Value
Set t = Me.T1ano
'If anoa = adaqui Then
' x = (dias / 365)
' y = (perc * vcomp)
' t = x * y
'Else
' t = "0"
'End If
End Sub
when i'm start to ru nalways show this error message "Object required error"
and open VBA and put the cursor in the set variable!
thanks for any help.