Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: Profil claudiaa22tm
| Femeie 29 ani Timis cauta Barbat 29 - 43 ani |
|
TRaP
Moderator
Inregistrat: acum 6 ani
Postari: 787
|
|
The following code is pun the the Worksheet code and upon any change in range A1:L300 it will insert the current date (today) in cell F1.
Public Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False Application.EnableEvents = False
Dim keyCells As Range Set keyCells = Range("A1:L300")
If Not Application.Intersect(keyCells, Range(Target.Address)) Is Nothing Then Worksheets("Sheet1").Range("F1").Value = Date End If
Application.ScreenUpdating = True Application.EnableEvents = True End Sub
|
Without using Application.ScreenUpdating and Application.EnableEvents the code would give error 2147417848 upon running, and Excel would freeze completely afterwards.
Sources:
|
|
pus acum 4 ani |
|