Sub pokus()
Dim i As Long, C As Long, ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
With ws
For i = 1 To 20000
If .Cells(i, 1) = "" Then C = C + 1: .Cells(1, 1) = C
DoEvents
Next i
End With
Set ws = Nothing
End Sub
Počas behu makra možno otvoriť iný zošit pomocou Súbor Otvoriť, nie dvojklikom.citovat
Dim i As Long, C As Long, ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
With ws
For i = 1 To 20000
If .Cells(i, 1) = "" Then C = C + 1: .Cells(1, 1) = C
DoEvents
Next i
End With
Set ws = Nothing
End Sub
Počas behu makra možno otvoriť iný zošit pomocou Súbor Otvoriť, nie dvojklikom.citovat