Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi folks,
for to load a .csv file into a worksheet just and only when it was changed before, I need the date and time when change happened. For to find out which property-item contains the data I need, I used this routine: Dim x, y Dim p As DocumentProperty workbooks(3).activate For Each p In ActiveWorkbook.CustomDocumentProperties x = p.Name y = p.Value Next It doesn't work because p contains "Nothing". Any hints available how I can "set" p? Getting it pointing - to the right place? Regards Peter Ostermann |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peter,
I think the csv file is a text file which cannot store the properties like ..xls files can. Hence you get p pointing to nothing. "Peter Ostermann" wrote: Hi folks, for to load a .csv file into a worksheet just and only when it was changed before, I need the date and time when change happened. For to find out which property-item contains the data I need, I used this routine: Dim x, y Dim p As DocumentProperty workbooks(3).activate For Each p In ActiveWorkbook.CustomDocumentProperties x = p.Name y = p.Value Next It doesn't work because p contains "Nothing". Any hints available how I can "set" p? Getting it pointing - to the right place? Regards Peter Ostermann |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Peter,
As Alok pointed out, these properties are not available to text files, only file types that support OLE storage. You would have to store additional data in the actual file as data or read the standard Windows file info; LastModifieddate etc.. Which properties do you require ? NickHK "Peter Ostermann" wrote in message ... Hi folks, for to load a .csv file into a worksheet just and only when it was changed before, I need the date and time when change happened. For to find out which property-item contains the data I need, I used this routine: Dim x, y Dim p As DocumentProperty workbooks(3).activate For Each p In ActiveWorkbook.CustomDocumentProperties x = p.Name y = p.Value Next It doesn't work because p contains "Nothing". Any hints available how I can "set" p? Getting it pointing - to the right place? Regards Peter Ostermann |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi NickHK, hi Alok,
..... got it functionating. See code below. "NickHK" schrieb im Newsbeitrag ... Peter, As Alok pointed out, these properties are not available to text files, only file types that support OLE storage. You would have to store additional data in the actual file as data or read the standard Windows file info; LastModifieddate etc.. Which properties do you require ? NickHK Private Function lastModified(path) As String Dim objFSO As Object Dim objFile As Object Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(path) lastModified = objFile.DateLastModified End Function Thanks to both of you for feedback. Best Regards Peter Ostermann |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DocumentProperty | Excel Worksheet Functions | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
I SAVED A FILE OVER ANOTHER A FILE IN EXCEL. THE OLD FILE WAS AN . | Excel Discussion (Misc queries) | |||
i received a file that reads powerpoint document file file exten. | Excel Discussion (Misc queries) |