InternetExplorer lastModified Property ?

Posted on 2003-03-12
Medium Priority
Last Modified: 2012-05-11
I want to check the "lastModified" date of a web page to check if I need to refresh the page. I can't get it to work. Here's what I've got in VB6:

Dim IE As New InternetExplorer
IE.Visible = True
IE.Navigate "http://www.microsoft.com"
Debug.Print IE.Document.LastModified

It works fine except the last line causes an error. So how do I access the property "lastModified" using the InternetExplorer object?
Question by:deming
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 14

Expert Comment

ID: 8122370
Try this

Dim IE As New InternetExplorer
IE.Visible = True
IE.Navigate "http://www.microsoft.com"

     While IE.Busy

Debug.Print IE.Document.LastModified
LVL 14

Accepted Solution

aelatik earned 500 total points
ID: 8122432
'Here 's a working one, beware that it doesn't work on Active Server Pages !!!

Private Sub Form_Load()
GetDate ("http://ericae.net/testcol.htm")
End Sub

Public Function GetDate(URL As String)
 Dim IE
 Set IE = CreateObject("InternetExplorer.Application")
     IE.Navigate URL
     While IE.Busy
        GetDateCode = IE.Document.LastModified
 MsgBox GetDateCode
End Function


Author Comment

ID: 8123828
Excellent job, that did the trick! Thank you for your fast response and sharing your expertise.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question