Mar 22nd, 2005, 08:44 PM
#1
Thread Starter
Fanatic Member
I need to get data form a web page
hi
I need to get data form http://www.upcdatabase.com
By ueing 07800008846
Manufacturer Dr Pepper/Seven-Up Inc
how do I open upcdatabase-2005.02.01-2005.03.01.diff in vb 6.0
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 08:46 PM
#2
Re: I need to get data form a web page
what is the data you need? is it always different? is there anything constant around it?
Mar 22nd, 2005, 08:52 PM
#3
Thread Starter
Fanatic Member
Re: I need to get data form a web page
UPC number
Description line
Size/Weight
Entered/Modified
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 08:55 PM
#4
Re: I need to get data form a web page
well, i dont see it on that page so i cant really help you...
Mar 22nd, 2005, 09:11 PM
#5
Thread Starter
Fanatic Member
Re: I need to get data form a web page
hi
did use the number 07800008846?
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 09:15 PM
#6
Re: I need to get data form a web page
okay i see, the site uses javascript or something to change pages, im not sure how to help you in that case...
Mar 22nd, 2005, 09:21 PM
#7
Thread Starter
Fanatic Member
Re: I need to get data form a web page
all I need is the code in vb 6.0
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 09:25 PM
#8
Re: I need to get data form a web page
yes i understand, but i cant help you with it
Mar 22nd, 2005, 09:28 PM
#9
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 09:45 PM
#10
Re: I need to get data form a web page
To clarify, can you use the web browser control for this? If you can then you can load the page and
automate the entry of upcs.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 09:52 PM
#11
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 10:02 PM
#12
Re: I need to get data form a web page
Add the web control to your project toolbox by clicking Project > Components > Controls tab >
and select "Microsoft Internet Control".
Then add an instance of it to your form.
Next we need to setup some properties so we get that upc page to load into our browser.
...
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:16 PM
#13
Re: I need to get data form a web page
This should get you started.
Try a search on the Forums. There was this member vivek.shakur that was doing allot of browser automation.
Forget it, I will post a link in a minute.
VB Code:
Option Explicit
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.upcdatabase.com/nocheckdigit.pl"
End Sub
Private Sub Form_Resize()
If Me.WindowState <> vbMinimized Then
WebBrowser1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End If
End Sub
Last edited by RobDog888; Mar 22nd, 2005 at 10:30 PM .
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:21 PM
#14
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 10:28 PM
#15
Re: I need to get data form a web page
Did you add the web browser to your form and is it named the same?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:30 PM
#16
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 10:31 PM
#17
Re: I need to get data form a web page
Sorry, in the resize event I had a different name for the control. I updated the code now.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:34 PM
#18
Re: I need to get data form a web page
Do you get the upc page loaded into your web browser form now?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:35 PM
#19
Thread Starter
Fanatic Member
Re: I need to get data form a web page
now I need to seva the data in to a file upc.dat
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 10:38 PM
#20
Re: I need to get data form a web page
We need to enter the data into the textbox and click the button first?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 10:39 PM
#21
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 10:42 PM
#22
Re: I need to get data form a web page
Ok, I was checking out the web browser control for this and its a bit limited. So I think we need to reference
Internet Explorer to get the full control. Give me a minute.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 11:03 PM
#23
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 22nd, 2005, 11:39 PM
#24
Re: I need to get data form a web page
Still there? I almost got it. This is cool control over IE . Just fixing a couple of
things but will be done soon.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 22nd, 2005, 11:58 PM
#25
Thread Starter
Fanatic Member
Re: I need to get data form a web page
http://return.no-ip.org/dalehnews/crnc_news/show_kb.asp?topicID=16&catID=6&catname=Programming%20(for%20POS%20Affiliates)%20-%20Advanced%20Users
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 23rd, 2005, 12:15 AM
#26
Re: I need to get data form a web page
I think this is the first step. It loads the page into the forms web browser. Then upon the command1 click
it will enter the upc into the web page's textbox and sends an enter keypress. Then the page returns
with the upc data.
VB Code:
Option Explicit
'Add component to Microsoft HTML Object Library
'Add component Microsoft Internet Controls
'Add a command button (Command1)
'Add a web browser control to the form (WebBrowser1)
Dim hDoc As MSHTML.HTMLDocument
Dim hInp As MSHTML.HTMLInputElement
Private Sub Command1_Click()
Set hInp = hDoc.getElementById("upc")
hInp.focus
hInp.Value = "07800008846"
SendKeys "{ENTER}", True
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.upcdatabase.com/nocheckdigit.pl"
End Sub
Private Sub Form_Resize()
If Me.WindowState <> vbMinimized Then
WebBrowser1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight - 450 'Make adjustment for command button
End If
End Sub
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
Set hDoc = WebBrowser1.Document
End Sub
Attached Images
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 01:26 AM
#27
Re: I need to get data form a web page
Have you done any work on extracting the resulting data? If so can you post it. I dont mind helping but I
really dont have enough time to write it all.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 01:59 AM
#28
Re: I need to get data form a web page
To answer your question, you can code it similar to the way you can write html and javascript.
We wait for the data page to return and load. Then we can access the elements and read the values for
each of the elements you need.
Are you familar with HTML and JavaScript?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 02:02 AM
#29
Thread Starter
Fanatic Member
Re: I need to get data form a web page
P.S. God Love You And Have A Good Day!!!
My web page
I need to get a free Iphone
Mar 23rd, 2005, 02:07 AM
#30
Re: I need to get data form a web page
Ok, let me see if I can do a little more for you, but you should try to pick some of this up as HTML and JS
are common skills among programmers.
It will come in handy for you .
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 02:38 AM
#31
Re: I need to get data form a web page
Did you need to save the UPC image too?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 03:12 AM
#32
Re: I need to get data form a web page
Ok, here is is. All you have to do is add code to read in your upc numbers to evaluate and write the values
I already parsed out for you to a file and its complete.
Oh ya, if you want to save the barcode picture, just parse out the location and set it as the source for a Inet
Transfer control. Then write it to an image file.
VB Code:
Option Explicit
'Add a reference to Microsoft HTML Object Library
'Add component Microsoft Internet Controls
'Add a command button (Command1)
'Add a web browser control to the form (WebBrowser1)
Dim hDoc As MSHTML.HTMLDocument
Dim hCol As MSHTML.IHTMLElementCollection
Dim hInp As MSHTML.HTMLInputElement
Dim hSub As MSHTML.HTMLInputButtonElement
Dim hTxt As MSHTML.HTMLInputTextElement
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Dim iStart As Integer
Dim iEnd As Integer
iStart = 0
iEnd = 0
If WebBrowser1.LocationURL <> "http://www.upcdatabase.com/nocheckdigit.pl" Then
WebBrowser1.Navigate2 "http://www.upcdatabase.com/nocheckdigit.pl"
End If
Do While WebBrowser1.Busy = True
DoEvents
Sleep 500
Loop
Set hDoc = WebBrowser1.Document
Set hInp = hDoc.getElementById("upc")
hInp.focus
hInp.Value = "07800008846"
SendKeys "{ENTER}", True
Do While WebBrowser1.Busy = True
DoEvents
Sleep 500
Loop
Set hInp = Nothing
'Parse the elements and read the values of the data returned
'Set document variable = to the new results documents page
Set hDoc = WebBrowser1.Document
'Find the description:
iStart = InStr(1, hDoc.body.innerHTML, "<TD>Description</TD>") + 37
iEnd = InStr(iStart, hDoc.body.innerHTML, "</TD></TR>")
MsgBox Mid$(hDoc.body.innerHTML, iStart, iEnd - iStart)
'Find the Size/Weight:
iStart = InStr(iStart, hDoc.body.innerHTML, "<TD>Size/Weight</TD>") + 37
iEnd = InStr(iStart, hDoc.body.innerHTML, "</TD></TR>")
MsgBox Mid$(hDoc.body.innerHTML, iStart, iEnd - iStart)
'Find Manufacturer:
iStart = InStr(iStart, hDoc.body.innerHTML, "<TD>Manufacturer</TD>") + 38
iEnd = InStr(iStart, hDoc.body.innerHTML, "(<A href=")
MsgBox Mid$(hDoc.body.innerHTML, iStart, iEnd - iStart)
'Find the Entered/Modified:
iStart = InStr(iStart, hDoc.body.innerHTML, "<TD>Entered/Modified</TD>") + 42
iEnd = InStr(iStart, hDoc.body.innerHTML, "</TD></TR>")
MsgBox Mid$(hDoc.body.innerHTML, iStart, iEnd - iStart)
End Sub
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://www.upcdatabase.com/nocheckdigit.pl"
End Sub
Private Sub Form_Resize()
If Me.WindowState <> vbMinimized Then
WebBrowser1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight - 450 'Make adjustment for command button
End If
End Sub
Private Sub WebBrowser1_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
' Set hDoc = WebBrowser1.Document
End Sub
Last edited by RobDog888; Mar 23rd, 2005 at 03:32 PM .
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 03:03 PM
#33
Re: I need to get data form a web page
I tried to run this, but can't find the MSHTML control. I thought I did things correctly. Any clues?
Mar 23rd, 2005, 03:25 PM
#34
Re: I need to get data form a web page
Did you add both controls to your toolbox/form?
VB Code:
'Add component Microsoft HTML Object Library
'Add component Microsoft Internet Controls
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 03:31 PM
#35
Re: I need to get data form a web page
Considering they're right next to each other in components, it wasn't hard.
One is called Scriptlets1, though.
Mar 23rd, 2005, 03:31 PM
#36
Re: I need to get data form a web page
I just connect to my home system and pulled up the project. It should be one control and one reference:
VB Code:
'Add reference to Microsoft HTML Object Library
'Add component Microsoft Internet Controls
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 03:41 PM
#37
Re: I need to get data form a web page
Hmm. It worked when I used two referenced instead of two components.
Thanks. On to then second one.
Mar 23rd, 2005, 03:42 PM
#38
Re: I need to get data form a web page
But if you dont use "Microsoft Internet Controls" control then you cant get a webbrowser on your form?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Mar 23rd, 2005, 04:12 PM
#39
Re: I need to get data form a web page
I have Internet Control Reference, so it works.
That is my first experience with the HTML Object library. I knew that there had to be more to parsing than what I've seen.
Thanks. I'll try to adapt this to other uses.
Last edited by dglienna; Mar 23rd, 2005 at 04:51 PM .
Mar 23rd, 2005, 05:06 PM
#40
Re: I need to get data form a web page
Yes, this was my first time using both the HTML Object library and the Web browser object.
Quite cool to be able to automate a web page using both techniques!
I knew that there had to be more to parsing than what I've seen.
This is all the code there was that I posted, unless you mean that you havent seen the way I get
the elements for population before.
Either way, its added to your archives of examples.
Glad you got it working, but where is Bob?
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width