I have a logsheet that i wanto be able to see what time certain cells were updated,
in column a row 1 i enter the phone number of a client, i want column b row 1 should enter the current time and the time should stay there (and not be updated when b2 or b3 were updated)
also is there a way to store a autorun macro only in 1 workbook??
i have multiple workbooks open and in the logsheet i have a autorun macro that runs every 5 seconds which saves the log so that no data gets mistakenly erased, but if im currently working on another worksheet (order form) the macro tries running in the open worksheet and it spits an error saying something like: cant save file cuz u havto save it as a macro enabled workbook, but i dont wanto really save the order form i wanto save the logsheet.
any advice??
Hi hqradio,
For the second question, it sounds like the macro that fires every 5 seconds needs some work. You may need to modify it so it is specific on what file to save instead of ActiveWorkbook.
For question 1 about putting in the current time when a phone number is entered in Col A you need an event macro, in my opinion. Find the attached with code behind Sheet1:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A1:A1000")) Is Nothing Then Cells(Target.Row, "B") = Now() End If End Sub
One test is worth a thousand opinions.
Click the * below to say thanks.
thanks, it works great.
do you have the code for my 2nd question?? i dont have any idea how to do it....
Search for "Excel VBA OnTime Repeat"
and study the code you find. Your second question is a lot harder.
One test is worth a thousand opinions.
Click the * below to say thanks.
i understand its alot harder but i cant even do the easy stuff.....
can anyone help?.......
i currently have this code in the file:
but it runs on any open workbook,Public dTime As DateSub MyMacro()dTime = Now + TimeValue("00:15:00")Application.OnTime dTime, "MyMacro" 'YOUR CODEEnd Sub
its probably very simple but please help me
thank you
Hi,
Read more at
http://www.cpearson.com/excel/OnTime.aspx or
http://answers.microsoft.com/en-us/o...0-f10a8fe474cf or
http://www.dailydoseofexcel.com/arch...ontime-method/
http://support.microsoft.com/kb/151503
Part of the learning process is to try and fail and read and learn until it works. The above should give you enough information.
My question is - Does the code go behing a Sheet, the Workbook or in a Module?
One test is worth a thousand opinions.
Click the * below to say thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks