اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

تفعيل الوقت


إذهب إلى أفضل إجابة Solved by lionheart,

الردود الموصى بها

السلام عليكم ورحمة الله وبركاته 

اسعد الله اوقاتكم بالصحة والخير

لدي اشكالية بسيطة اتمنى ان اجد حلها لديكم وهي كالتالي  ان يكون الوقت شغال يعني تقلب الثواني والدقائق مجرد فتح اليوزر فورم 

وتقبلوا خالص التحية 

مثال.xlsm

رابط هذا التعليق
شارك

  • أفضل إجابة

In standard module

Dim timerActive As Boolean

Public Sub Start_Timer()
    timerActive = True
    Application.OnTime Now() + TimeValue("00:00:01"), "Timer"
End Sub

Public Sub Stop_Timer()
    timerActive = False
End Sub

Public Sub Timer()
    If timerActive Then
        UserForm1.Label1.Caption = Time
        Application.OnTime Now() + TimeValue("00:00:01"), "Timer"
    End If
End Sub

then in userform module

Private Sub UserForm_Activate()
    Call Start_Timer
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
    Call Stop_Timer
End Sub

 

  • Like 2
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information