Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

564 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