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

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

قام بنشر

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

اساتذتنا الافاضل وخبرا الاكسل 

احتاج مساعدة فى نقطتين 

* الشيت المرفق به جدول بسيط لترحيل البيانات واحتاج الى تعديل هذه البيانات انه اثناء الوقوف على الصف المراد تعديله يتم استدعاء البيانات من الجدول الى حقول الادخال لتنفيذ التعديلات والحفظ من جديد 

* احيانا يكون هناك بعض المهام يتك تكرارها بشكل دوري كل اسبوع مثلا لذلك احتاج كود لتكرار المهمة حسب عدد الايام / الاسابيع / الشهور وبناء على تاريخ البدأ والانتهاء المذكورين 

وجزاكم الله خيرا مقدما 

 

 

 

image.png.068f0b49aaaaac294cf3d317e2231d7f.png

Task Tracker .xlsm

قام بنشر

تعديل تم حل المشكلة الاولى وهي استدعاء الخلايا

متبقى مشكلة التكرار

استخدمت الكود المرفق ولكن فيه مشاكل

ارجو المساعدة فى التصحيح او كتابة كود جديد

Sub Task_MakeRecurring()
Dim Freq As Long
Dim FreqQty As Long
Dim TotTime As Double
Dim StartOnDt As Date, UntilDt As Date, StartDt As Date, EndDt As Date
With Main
    'If .Range("b5").Value = Empty Then
        'MsgBox "Please make sure to enter a Task Name before saving"
        'Exit Sub
    'End If
    'If .Range("b7").Value = Empty Or .Range("b8").Value = Empty Then
       ' MsgBox "Please make sure task has Start and End Dates to make them recurring"
       ' Exit Sub
   ' End If
   ' If .Range("B1").Value < 4 Then
        'MsgBox "Please make sure to enter Recurring Frequency, Start On and Until Date fields to make this task Recurring"
      '  Exit Sub
   ' End If
    TotTime = .Range("g2").Value 'Total Time
    FreqQty = .Range("b14").Value 'Frequency Qty
    Freq = .Range("b13").Value 'Frequency
    StartOnDt = .Range("b15").Value 'Start On Date
    UntilDt = .Range("b16").Value 'Until Date
    
    StartDt = StartOnDt  'Set Initial Starting Date
    EndDt = StartDt + TotTime 'End Date is Start Date + Total Time
    
    Do While StartDt <= UntilDt 'Create Tasks Until Start Date is greater than Until Date
        .Range("b7").Value = StartDt 'Set Starting Date
        .Range("b8").Value = Int(EndDt)  'Set Ending Date (date as a whole number)
       Call Add_Data 'Save Task
        
        'Update Start & End Dates for Next Task
        Select Case Freq
            Case Is = "Day(s)"
                StartDt = DateAdd("d", FreqQty, StartDt)
           
            Case Is = "Week(s)"
                StartDt = DateAdd("ww", FreqQty, StartDt)
            Case Is = "Months(s)"
                StartDt = DateAdd("m", FreqQty, StartDt)
        End Select
            EndDt = StartDt + TotTime 'Update End Date
    Loop
End With
Call Add_Data 'Update Task list
End Sub

 

Task Tracker test - Copy.xlsm

  • Like 1

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