ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Result (https://www.excelbanter.com/excel-programming/306759-result.html)

Alvin Hansen[_2_]

Result
 
hi
I have this
Private Sub fradato_Change()
'Here i write a date
End Sub
Private Sub tildato_Change()
'Her i write another date
End Sub
Private Sub dageialt_Change()
' And it is here i will have the result off
tildato.value - fradato.value
But i can't making work
nothing happens
End Sub

Hope one can help

regards alvin


Alvin Hansen[_2_]

Result
 
Hi sebatienm

Well i try to ecplain
I have 3 textbox
in the two textbox i will write a date
in the last textbox i will have how many days are there
between textbox 2 and textbox 1

Hope you understand

Regards alvin


"sebastienm" skrev:

Hi Alvin.
- What kind of controls are fridato, tildato, and dageialt? What are you
trying to do?
- ''Here i write a date': you write the date where? from the control to an
excel sheet?
- what are you trying to do?

Regards,
Sébastien

"Alvin Hansen" wrote:

hi
I have this
Private Sub fradato_Change()
'Here i write a date
End Sub
Private Sub tildato_Change()
'Her i write another date
End Sub
Private Sub dageialt_Change()
' And it is here i will have the result off
tildato.value - fradato.value
But i can't making work
nothing happens
End Sub

Hope one can help

regards alvin


sebastienm

Result
 
ok, what about:
"when fradato changes or when tildato changes then modify dageialt"
- I added a sub : EditDateDiff
- I deleted : dageialt_Change

Private Sub fradato_Change()
EditDateDiff
End Sub

Private Sub tildato_Change()
EditDateDiff
End Sub

Private Sub EditDateDiff()
if isdate(fradato.text) and isdate(tildato) then 'if values are dates
dageialt.value = datevalue(tildato.value) - datevalue(fradato.value)
end if
End Sub

Regards,
Sébastien

"Alvin Hansen" wrote:

Hi sebatienm

Well i try to ecplain
I have 3 textbox
in the two textbox i will write a date
in the last textbox i will have how many days are there
between textbox 2 and textbox 1

Hope you understand

Regards alvin


"sebastienm" skrev:

Hi Alvin.
- What kind of controls are fridato, tildato, and dageialt? What are you
trying to do?
- ''Here i write a date': you write the date where? from the control to an
excel sheet?
- what are you trying to do?

Regards,
Sébastien

"Alvin Hansen" wrote:

hi
I have this
Private Sub fradato_Change()
'Here i write a date
End Sub
Private Sub tildato_Change()
'Her i write another date
End Sub
Private Sub dageialt_Change()
' And it is here i will have the result off
tildato.value - fradato.value
But i can't making work
nothing happens
End Sub

Hope one can help

regards alvin


Alvin Hansen[_2_]

Result
 
Thank you tkank you
It's working
After have trying all things so i'm very glad for your help

Best regards alvin


"sebastienm" skrev:

ok, what about:
"when fradato changes or when tildato changes then modify dageialt"
- I added a sub : EditDateDiff
- I deleted : dageialt_Change

Private Sub fradato_Change()
EditDateDiff
End Sub

Private Sub tildato_Change()
EditDateDiff
End Sub

Private Sub EditDateDiff()
if isdate(fradato.text) and isdate(tildato) then 'if values are dates
dageialt.value = datevalue(tildato.value) - datevalue(fradato.value)
end if
End Sub

Regards,
Sébastien

"Alvin Hansen" wrote:

Hi sebatienm

Well i try to ecplain
I have 3 textbox
in the two textbox i will write a date
in the last textbox i will have how many days are there
between textbox 2 and textbox 1

Hope you understand

Regards alvin


"sebastienm" skrev:

Hi Alvin.
- What kind of controls are fridato, tildato, and dageialt? What are you
trying to do?
- ''Here i write a date': you write the date where? from the control to an
excel sheet?
- what are you trying to do?

Regards,
Sébastien

"Alvin Hansen" wrote:

hi
I have this
Private Sub fradato_Change()
'Here i write a date
End Sub
Private Sub tildato_Change()
'Her i write another date
End Sub
Private Sub dageialt_Change()
' And it is here i will have the result off
tildato.value - fradato.value
But i can't making work
nothing happens
End Sub

Hope one can help

regards alvin



All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com