Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Below is a change declaration I have in a sheet, is it possible to have a
similar change declaration using docProps in another cell? So when the change is made to cell "I7" the date is put in "J7" and the current author is put in "L7" I tried to copy what I have below except change = Now to = DocProps("author") and that didnt work. Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now End If End Sub |
#2
![]() |
|||
|
|||
![]()
Private Sub Worksheet_change(ByVal Target As Range)
If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = ActiveWorkbook.BuiltinDocumentProperties("author") End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Below is a change declaration I have in a sheet, is it possible to have a similar change declaration using docProps in another cell? So when the change is made to cell "I7" the date is put in "J7" and the current author is put in "L7" I tried to copy what I have below except change = Now to = DocProps("author") and that didnt work. Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now End If End Sub |
#3
![]() |
|||
|
|||
![]()
Worked like a charm, thanx
Where can I find a "dictionary" of VB code or the pop up entries that come up to help complete the code? "Bob Phillips" wrote: Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = ActiveWorkbook.BuiltinDocumentProperties("author") End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Below is a change declaration I have in a sheet, is it possible to have a similar change declaration using docProps in another cell? So when the change is made to cell "I7" the date is put in "J7" and the current author is put in "L7" I tried to copy what I have below except change = Now to = DocProps("author") and that didnt work. Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now End If End Sub |
#4
![]() |
|||
|
|||
![]()
Chris,
This is the answer I gave to a similar question this morning http://msdn.microsoft.com/library/de...texcel2000.asp The object browser in VBA The VBA Help file (look up Excel Object Model) -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Worked like a charm, thanx Where can I find a "dictionary" of VB code or the pop up entries that come up to help complete the code? "Bob Phillips" wrote: Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = ActiveWorkbook.BuiltinDocumentProperties("author") End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Below is a change declaration I have in a sheet, is it possible to have a similar change declaration using docProps in another cell? So when the change is made to cell "I7" the date is put in "J7" and the current author is put in "L7" I tried to copy what I have below except change = Now to = DocProps("author") and that didnt work. Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now End If End Sub |
#5
![]() |
|||
|
|||
![]()
link dosent work.
but I have run into a glitch with this function, kinda, What this tool is doing is I have a button that runs a macro to update links to the sheet and makes a change to the cell "I7" so "J7" shows when the update macro was run and I want "L7" to show who ran the update. Using author, it puts my name in regardless of who (which computer) has the sheet open. I have another cell that shows who the last author is, but last author dosent work unless the person saves the sheet before running the update. I suppose I can have as part of the macro to save sheet? "Bob Phillips" wrote: Chris, This is the answer I gave to a similar question this morning http://msdn.microsoft.com/library/de...texcel2000.asp The object browser in VBA The VBA Help file (look up Excel Object Model) -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Worked like a charm, thanx Where can I find a "dictionary" of VB code or the pop up entries that come up to help complete the code? "Bob Phillips" wrote: Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = ActiveWorkbook.BuiltinDocumentProperties("author") End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Below is a change declaration I have in a sheet, is it possible to have a similar change declaration using docProps in another cell? So when the change is made to cell "I7" the date is put in "J7" and the current author is put in "L7" I tried to copy what I have below except change = Now to = DocProps("author") and that didnt work. Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now End If End Sub |
#6
![]() |
|||
|
|||
![]() "chris w" wrote in message ... link dosent work. Try this http://msdn.microsoft.com/library/de...texcel2000.asp but I have run into a glitch with this function, kinda, What this tool is doing is I have a button that runs a macro to update links to the sheet and makes a change to the cell "I7" so "J7" shows when the update macro was run and I want "L7" to show who ran the update. Using author, it puts my name in regardless of who (which computer) has the sheet open. I have another cell that shows who the last author is, but last author dosent work unless the person saves the sheet before running the update. I suppose I can have as part of the macro to save sheet? No need. I should have thought of that when I was writing it. Updated version Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = Environ("username") End If End Sub Bob |
#7
![]() |
|||
|
|||
![]()
Bob, your help has been spot on, thank you,
but I believe I may be getting in over my head. The last string change to = environ("username"), works perfectly, except I realize now my user name on my XP machine shows "Owner" on the win 98 machines shows nothing. Changing the "Owner" designation looks to get messy. "Bob Phillips" wrote: "chris w" wrote in message ... link dosent work. Try this http://msdn.microsoft.com/library/de...texcel2000.asp but I have run into a glitch with this function, kinda, What this tool is doing is I have a button that runs a macro to update links to the sheet and makes a change to the cell "I7" so "J7" shows when the update macro was run and I want "L7" to show who ran the update. Using author, it puts my name in regardless of who (which computer) has the sheet open. I have another cell that shows who the last author is, but last author dosent work unless the person saves the sheet before running the update. I suppose I can have as part of the macro to save sheet? No need. I should have thought of that when I was writing it. Updated version Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = Environ("username") End If End Sub Bob |
#8
![]() |
|||
|
|||
![]()
Chris,
Here is an alternative. I can't test it as I don't have Win98 or 95, but it shoudl work. It does mean that on the 98 machines, you need to ensure that the Excel user is defined (ToolsOptions and on the general tab, set5 the User Name box). Private Sub Worksheet_change(ByVal Target As Range) Dim sOS As String Dim sSystem As String If Not Intersect(Target, Range("I7")) Is Nothing Then sOS = Application.OperatingSystem Select Case True Case InStr(1, sOS, "NT 5.01") 0: sSystem = "XP" Case InStr(1, sOS, "NT 5.00") 0: sSystem = "2000" Case InStr(1, sOS, "NT 4.00") 0: sSystem = "NT4" Case InStr(1, sOS, "4.10") 0: sSystem = "Win98" Case InStr(1, sOS, "4.00") 0: sSystem = "Win95" End Select Range("J7") = Now If sSystem = "Win98" Or ssyetm = "Win95" Then Range("L7").Value = applicationusername Else Range("L7").Value = Environ("username") End If End If End Sub -- HTH RP (remove nothere from the email address if mailing direct) "chris w" wrote in message ... Bob, your help has been spot on, thank you, but I believe I may be getting in over my head. The last string change to = environ("username"), works perfectly, except I realize now my user name on my XP machine shows "Owner" on the win 98 machines shows nothing. Changing the "Owner" designation looks to get messy. "Bob Phillips" wrote: "chris w" wrote in message ... link dosent work. Try this http://msdn.microsoft.com/library/de...texcel2000.asp but I have run into a glitch with this function, kinda, What this tool is doing is I have a button that runs a macro to update links to the sheet and makes a change to the cell "I7" so "J7" shows when the update macro was run and I want "L7" to show who ran the update. Using author, it puts my name in regardless of who (which computer) has the sheet open. I have another cell that shows who the last author is, but last author dosent work unless the person saves the sheet before running the update. I suppose I can have as part of the macro to save sheet? No need. I should have thought of that when I was writing it. Updated version Private Sub Worksheet_change(ByVal Target As Range) If Not Intersect(Target, Range("I7")) Is Nothing Then Range("J7") = Now Range("L7").Value = Environ("username") End If End Sub Bob |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change cell back color on click | Excel Discussion (Misc queries) | |||
how do i make a date change automatically if i change one before . | Excel Discussion (Misc queries) | |||
How to change the default font and size of "comments"? | Excel Discussion (Misc queries) | |||
Calculate change over time | Excel Worksheet Functions | |||
Worksheet Row Change event | Excel Discussion (Misc queries) |