Hi Again Blitzoff, sorry for all the messages.. I took a look at the application version check and I could not find a problem. It seems to be working ok for me.
Please, if it is ok, could you try to run the following from an Office VBA module ? If you can't no problem.. I will find the prob one way or another but it will be great if you can take a look
To run it from a VBA module, you can do an ALT F11 from Excel and then insert a module and then paste in the code below.. The code is a slimmed down version of the addin version but it is the same really. To run it select a line within the Sub Check_App_Version() and hit f5. Sure you know that already but just in case..
Sorry to ask you to take a look but it will be a big help if you can let me know if this works.. IF you have any questions at all please let me know..
Thanks a million, Al
//START PASTING BELOW THIS LINE
Private Declare Function InternetOpen Lib "wininet.dll" _
Alias "InternetOpenA" (ByVal sAgent As String, _
ByVal lAccessType As Long, ByVal sProxyName As String, _
ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Private Declare Function InternetOpenUrl Lib "wininet.dll" _
Alias "InternetOpenUrlA" (ByVal hOpen As Long, _
ByVal sUrl As String, ByVal sHeaders As String, _
ByVal lLength As Long, ByVal lFlags As Long, _
ByVal lContext As Long) As Long
Private Declare Function InternetReadFile Lib "wininet.dll" _
(ByVal hFile As Long, ByVal sBuffer As String, _
ByVal lNumBytesToRead As Long, lNumberOfBytesRead As Long) _
As Integer
Private Declare Function InternetCloseHandle _
Lib "wininet.dll" (ByVal hInet As Long) As Integer
Public Function OpenURL(ByVal sUrl As String) As String
Dim hOpen As Long
Dim hOpenUrl As Long
Dim bDoLoop As Boolean
Dim bRet As Boolean
Dim sReadBuffer As String * 2048
Dim lNumberOfBytesRead As Long
Dim sBuffer As String
Dim Query As String
Dim fullstring As String
hOpen = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
Query = ""
hOpenUrl = InternetOpenUrl(hOpen, sUrl, vbNullString, 0, INTERNET_FLAG_RELOAD, 0)
bDoLoop = True
While bDoLoop
sReadBuffer = vbNullString
bRet = InternetReadFile(hOpenUrl, sReadBuffer, Len(sReadBuffer), lNumberOfBytesRead)
sBuffer = sBuffer & Left$(sReadBuffer, lNumberOfBytesRead)
If Not CBool(lNumberOfBytesRead) Then bDoLoop = False
Wend
If hOpenUrl <> 0 Then InternetCloseHandle (hOpenUrl)
If hOpen <> 0 Then InternetCloseHandle (hOpen)
OpenURL = sBuffer
End Function
Sub Check_App_Version()
Dim sSearchresults As String, sUrl As String, sVersion As String
Dim dLocalVersion As Double
sUrl = "http://www.sqlexcel.net/ApplicationVersion.html"
sSearchresults = OpenURL(sUrl)
sVersion = Mid(sSearchresults, 13, 4)
dLocalVersion = CDbl(sVersion) '//REMOTE VERSION SHOULD READ as 1.2
If dLocalVersion > "1.2" Then '//HARD CODED THIS TO BE 1.2 (in app, it used app.major , app.minor
MsgBox "There is a new version of SQL Excel available for download." & Chr(13) & "When you can, Please go to
www.sqlexcel.net to download it."
Else
MsgBox "SQL Excel is uptodate", vbInformation, "SQL Excel"
End If
End Sub
//END PASTING ABOVE THIS LINE