|
-
Dec 22nd, 2005, 05:58 PM
#1
Thread Starter
Member
Label Click Open IE
Hey guys, I got a quick question.
I have a program that I wrote a while back and what it does is when
a user clicks on a label it opens up a DOS Prompt and ping a IP and then
exits out.
What I would like to do is instead of pinging an IP at a DOS prompt.
I would like for it to open up internet exploere with a specific IP or DNS name.
So my user would click on this label and it automatically opens up IE with the IP address or URL that I have specified.
Thanks in Advance
ScarEye
P.S. Noob to programming =)
-
Dec 22nd, 2005, 06:45 PM
#2
Re: Label Click Open IE
In the labels click event you would shell or shellexecute the url that you want the browser to open up to.
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 
-
Dec 22nd, 2005, 07:06 PM
#3
Thread Starter
Member
Re: Label Click Open IE
 Originally Posted by RobDog888
In the labels click event you would shell or shellexecute the url that you want the browser to open up to.
Where is the Click Event Option ?
In my code section this is what I have
If Index = 4 Then
Shell "C:\Program Files\Internet Explorer\IEXPLORER http://www.google.com";
That does not seem to work. Can you help me fix this ?
Thanks in Advance
ScarEye
Last edited by ScarEye; Dec 22nd, 2005 at 07:13 PM.
-
Dec 22nd, 2005, 07:33 PM
#4
Re: Label Click Open IE
As long as this is for your system its ok because the path and program may be different on someones elses computer.
VB Code:
Option Explicit
Private Sub Label1_Click()
Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE http://www.vbforums.com", vbNormalFocus
End Sub
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 
-
Dec 22nd, 2005, 07:41 PM
#5
Thread Starter
Member
Re: Label Click Open IE
Okay this worked for me perfectly.
Shell ("C:\Program Files\Internet Explorer\Iexplore.exe " & "www.google.com"), vbNormalFocus
Now what do I have to do inorder to have it come up maximized ?
Thanks for your help RobDog888
ScarEye
-
Dec 22nd, 2005, 07:46 PM
#6
Thread Starter
Member
Re: Label Click Open IE
Nevermind, I got it.. Thanks for you help.. =)
ScarEye
P.S. For the next poor soul that needs this info the answer is
Shell ("C:\Program Files\Internet Explorer\Iexplore.exe " & "www.google.com"), vbMaximizedFocus
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
|