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

x
?
Solved

VB web access

Posted on 2003-03-03
5
Medium Priority
?
169 Views
Last Modified: 2010-04-07
I'm trying to make a program that will take data off a website and assign it to variables in the program, but i have no idea how to get it to get the data externally :s (sorry, new to vb programming and i hate it)

Any help would be great

Cheers
M
0
Comment
Question by:matrices
  • 2
  • 2
5 Comments
 
LVL 14

Expert Comment

by:aelatik
ID: 8057129
You can fetch data with the INET or WEBBROWSER control, but what info do you want to fetch from the web ? Are we talking about an entire page or a part oof that page
0
 

Author Comment

by:matrices
ID: 8057170
part of the page, i basically want to check which of a selection of images are in use and for the program to assign a value to an array

ie
pictures 1, 4, 22, 6, 2 are on the page then to copy them into an array that i can fiddle with

M
0
 
LVL 14

Accepted Solution

by:
aelatik earned 600 total points
ID: 8057301
Here, this will fetch the source between the body tags ( you have to search for what you want inside the result of GetHTMLCode.

Private Sub Form_Load()
GetHTMLCode ("http://www.google.com")
End Sub

Public Function GetHTMLCode(URL As String)
   Dim IE
   Set IE = CreateObject("InternetExplorer.Application")
       IE.Navigate URL
       While IE.Busy
           DoEvents
       Wend
           GetHTMLCode = IE.Document.body.innerHTML
           'Replace above line with below if you want the entire page instead of the body tags
           'GetHTMLCode = IE.Document.documentelement.innerHTML
   MsgBox GetHTMLCode
End Function
0
 

Expert Comment

by:WarLord
ID: 8057327
can you guys help me out also?

http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/qManageQuestion.jsp?qid=20536106

it's about filling stuff in on a webpage
0
 

Author Comment

by:matrices
ID: 8057370
MUCHO FANTASTICO AMIGO!!! :D

thats great buddy

Cheers

M
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

581 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