محمد طاهر عرفه قام بنشر يونيو 9, 2003 قام بنشر يونيو 9, 2003 مع ملاحظة أن السطرين myrows = 20 mycols = 5 لتحديد مجال البحث ، و اذا اردت البحث بدءا من الخلية الفعالية الي آخر الشيت فأزل السطران Sub FindFirstEmpty() ' ' Application.ScreenUpdating = False Cells.Select myrows = Selection.Rows.Count mycols = Selection.Columns.Count myrows = 20 mycols = 5 origraw = myrows ActiveCell.Select For i = 0 To myrows - 1 For j = 0 To mycols - 1 If ActiveCell.Offset(i, j).FormulaR1C1 <> "" Then GoTo newrow End If Next MsgBox "Founf the Fist Empty Row " ActiveCell.Offset(i, j).Activate ActiveCell.EntireRow.Select Exit Sub ' ActiveCell.Offset(1, 0).Activate ' myrows = myrows - 1 newrow: Application.StatusBar = " checking ...." & _ Format(i / origraw, "0.0%") & " Please Wait......." Next i Application.ScreenUpdating = True Application.StatusBar = False End Sub FindFirstEmpty.zip 1
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.