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

تحديد وقت (فترة) لعمل الكود


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

السلام عليكم

هذا الكود استخدمه لطباعة كافة السجلات الموجودة 

 

Sub print_whole_class()
For I = 1 To [stunames].Rows.Count
    [g5] = Application.Index([stunames], I)
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
 Next
    [g5] = Application.Index([stunames], 1)
End Sub

 

اريد اضافة كود يحدد وقت انتهاءه

بمعنى عند تاريخ 1/1/2020 يتوقف الكود عن العمل طالبا تحديث البيانات مثلا

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

شكرا جزيلا

بعد محاولات وصلت لها بهذه الطريقة 

مع وضع التاريخ المطلوب بالخلية g777

 

Sub print_whole_class()
If [g777] > [today()] Then
For I = 1 To [stunames].Rows.Count
    [g5] = Application.Index([stunames], I)
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
 Next
    [g5] = Application.Index([stunames], 1)
    End If
    End Sub

    
 

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

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