Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default For the Pro's

I'm trying to open a connection to a local webserver and take the
source for the page as a string so I can handle the javascript alert
msgs before I thro it at a spreadsheet. Other wise my app just kinda
blinks at me until I tell it to shutup and get back to work. Which I
would prefer not to do because my co-works don't like it when I'm angry
;) anywho, the trick is I would prefer to beable to not have to log in
to the webserver everytime I want to retrieve a page. in the past I've
used an instance of IE glued to a static. After I log into ther server
with it then I can come and go as I please using other instances of IE.
It no wok when I do this with a direct connection.
I have a function here that works well if this was what I wanted it to
do :)
but instead of giving me the page I ask for it gives me the source for
the logon to the webserver. anyone have any ideas on how I could prop
the server door open so I can come and go as I please without having to
have my damn ID out all the time?


'Private Function OpenURL(ByVal sURL As String) As String
' Dim hOpen As Long
' Dim hOpenUrl As Long
' Dim lBytesRead As Long
' Dim sBuffer As String
' Dim sData As String
' const FLAG = &H80000000
' Const PRECONFIG = 0
'
' On Error GoTo DOHerr
'
' hOpen = InternetOpen("PS", PRECONFIG, vbNullString, vbNullString,
0)
'
' If (hOpen < 0) Then
' hOpenUrl = InternetOpenUrl(hOpen, sURL, vbNullString, 0, FLAG
, 0)
' If (hOpenUrl < 0) Then
' Do
' sBuffer = vbNullString
' Call InternetReadFile(hOpenUrl, sBuffer, Len(sBuffer),
lBytesRead)
' sData = sData & Left$(sBuffer, lBytesRead)
' Loop Until (lBytesRead = 0)
'
' InternetCloseHandle (hOpenUrl)
'
' End If
'
' InternetCloseHandle (hOpen)
'
' End If
'
' OpenURL = sData
' Exit Function
'
'DOHerr:
' 'internal error
' If (hOpen < 0) Then InternetCloseHandle (hOpen)
'End Function

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 basic Excel questions for you pro's cjtj4700 Excel Discussion (Misc queries) 7 November 24th 05 07:31 PM
Calling MVP's & pro's urgently please !! Adam Excel Discussion (Misc queries) 6 January 3rd 05 10:45 AM


All times are GMT +1. The time now is 04:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"