i'm trying to get VBA to auto timestamp column a when any cell in that row changes.... any ideas....???
i'm trying to get VBA to auto timestamp column a when any cell in that row changes.... any ideas....???
You need to code for the Worksheet_Change event. Be careful that you only apply the timestamp for specific columns though---or at least exclude the timestamp column from consideration---or you will generate a new timestamp every time you generate a new timestamp!
_______________
Floyd Emerson
Business Intelligence Consultant
Perth, Western Australia
can you provide sample code, i am new to VBA, experienced in web languages....
Hello stolen_83,
Welcome to the Forum!
There are two macros you need to install. One is the Worksheet_Change event and the second is in a VBA Module. The second macro adds the time stamp as a Comment to the cell. If the cell does not have a Comment then one is added automatically. If the cell does have a Comment then only the time stamp is added.
Worksheet_Change Event Code
![]()
Please Login or Register to view this content.
How to Save a Worksheet Event Macro
- Copy the macro using CTRL+C keys.
- Open your Workbook and Right Click on the Worksheet's Name Tab for the Worksheet the macro will run on.
- Left Click on View Code in the pop up menu.
- Paste the macro code using CTRL+V
- Save the macro in your Workbook using CTRL+S
Module Code - AddTimestamp Macro
![]()
Please Login or Register to view this content.
Adding the Macro (Excel 95 - 2003)
- Copy the macro above pressing the keys CTRL+C
- Open your workbook
- Press the keys ALT+F11 to open the Visual Basic Editor
- Press the keys ALT+I to activate the Insert menu
- Press M to insert a Standard Module
- Paste the code by pressing the keys CTRL+V
- Save the Macro by pressing the keys CTRL+S
- Press the keys ALT+Q to exit the Editor, and return to Excel.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks