View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Cells().value is null but I can see data

That code gets information about a file.

It is unclear what a caption on the sheet is versus data in cells.

--
Regards,
Tom Ogilvy


JohnEnnever wrote in message
...
I am extracting data from a Excel sheet. It looks like a special form.

When I retrieve

Cells(row,col).value

I can get the Captions on the sheet but not the data in other cells.

I can see the data - I can see which cell it is in - How do I get hold
of it ?

I found this in one of the modules - is this how the data is hidden?

Public Declare Function FindFirstFile Lib "kernel32" Alias
"FindFirstFileA" _
(ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As
Long

Public Type WIN32_FIND_DATA
dwFileAttributes As Long
ftCreationTime As FILETIME
ftLastAccessTime As FILETIME
ftLastWriteTime As FILETIME
nFileSizeHigh As Long
nFileSizeLow As Long
dwReserved0 As Long
dwReserved1 As Long
cFileName As String * 260
cAlternate As String * 14
End Type

Private Sub ShowFileInfo()
' This subroutine demonstrates the technique
Dim hFile As Long
Dim WFD As WIN32_FIND_DATA
Dim FullName As String
Dim Created As String
Dim LastWrite As String

' FullName is the path and filename
' Substitute any valid file and path
FullName = ActiveWorkbook.FullName
hFile = FindFirstFile(FullName, WFD)

If hFile 0 Then
Created = FileDate(WFD.ftCreationTime)
MsgBox "File Created: " & Created, vbInformation, FullName
Else
MsgBox "File not found.", vbCritical, FullName
End If
End Sub


---
Message posted from http://www.ExcelForum.com/