اذهب الي المحتوي
أوفيسنا

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

قام بنشر
 Dim strDate As String, strTime As String
  Dim filePath As String
 Dim ws As Worksheet
  Dim i As Long
Application.ScreenUpdating = False
Application.EnableEvents = False
Application.Calculation = xlCalculationManual
  For i = 0 To ListBox1.ListCount - 1
  If ListBox1.Selected(i) = True Then
  For Each ws In ThisWorkbook.Worksheets
  For Each f In ws.Range("a2:a10000")
  If f = ListBox1.List(i, 0) Then
  ws.Select
  f.Select
  Exit For
  End If
  Next f
  Next ws
 ActiveCell.Offset(0, 3).Value = "ايقاف"
   ActiveCell.Offset(0, 4).Value = Date
  End If
  Next i
  i = Empty
    Application.Calculation = xlCalculationAutomatic
    Application.EnableEvents = True
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True

 

  • أفضل إجابة
قام بنشر

تفضل اخى الكريم 

 Dim strDate As String, strTime As String
 Dim filePath As String
 Dim ws As Worksheet
 Dim i As Long
 Application.ScreenUpdating = False
 Application.EnableEvents = False
 Application.Calculation = xlCalculationManual

  For i = 0 To ListBox1.ListCount - 1
  If ListBox1.Selected(i) = True Then

  For Each ws In ThisWorkbook.Worksheets

    For Each f In ws.Range("a2:a" & cells(Rows.Count, "A").End(xlUp).Row)

       If f = ListBox1.List(i, 0) Then
         f.Offset(0, 3).Value = "ايقاف"
         f.Offset(0, 4).Value = Date

       Exit For
       End If
     Next f
  Next ws
  End If
  Next i
  i = Empty

 Application.Calculation= xlCalculationAutomatic
 Application.EnableEvents = True
 Application.DisplayAlerts = True
 Application.ScreenUpdating = True

 

 

  • Like 1
  • 4 weeks later...

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