473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Opening a webpage with a command button

Can I create a command button that opens IE and pass an associated website address to target? In other words, I list a text link in a form. If I add a button what is the event procedure I need to create to pass along the actual url to IE?
Feb 14 '07 #1
4 2190
ADezii
8,834 Expert 8TB
Can I create a command button that opens IE and pass an associated website address to target? In other words, I list a text link in a form. If I add a button what is the event procedure I need to create to pass along the actual url to IE?
The 'No Frills' and 'Simplest' approach by far is:
__1 Assuming a Text Box on your Form named txtURL.
__2 Typing a Internet Address into this Text Box. e.g. yahoo.com, microsoft.com, etc.and placing this code in the Click() Event of a Command Button will navigate to that location assuming it is a valid Address.
__3 You must know the Absolute Path to Internet Explorer for this to work.
__4 An invalid address will simply produce the This Page cannot be displayed screen within IE.
__5 You may also want to look into the possibility of incorporating a Microsoft Web Browser Control into your application.
Expand|Select|Wrap|Line Numbers
  1. If Len(Me![txtURL]) > 0 Then
  2.   Dim retVal
  3.   retVal = Shell("C:\Program Files\Internet Explorer\Iexplore.exe " & Me![txtURL], vbMaximizedFocus)
  4. Else
  5.   Exit Sub
  6. End If
Feb 15 '07 #2
That worked perfectly! No frills was easy and easy is for me!
Feb 16 '07 #3
Thank you!
Feb 16 '07 #4
ADezii
8,834 Expert 8TB
Thank you!
You're quite welcome.
Feb 16 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
15
by: qwweeeit | last post by:
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no...
2
by: Jurjen de Groot | last post by:
I would like to implement a button which will, upon click, print the current webpage. I have no idea where to begin, I think I need some sort of client scripting but I suppose there's a simple...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
2
by: mick79 | last post by:
hello, here's my problem, I'm using navigationbuttons in html code with the tag <button> in order to use them as a link to a new website I should use Java. I've succeeded in making the link work...
3
by: Sharon | last post by:
hello all, I was successfull in passing one value from first webpage to second webpage, but not sure how to pass three textbox values from the first page to the second page. Below is the code i...
1
by: new214 | last post by:
Ive got an asp page which has a button and once you click on the button you can select to either open or save a fle. My requirement is that- to have this option of opening and saving actually on the...
6
by: martin DH | last post by:
**Urgent Need** I'll throw out the basics and any assistance is very, very, very much appreciated! Access 2003 on XP On a form (frmMain) is an option group of check boxes (ReportFrame) from...
9
by: angi35 | last post by:
Hi - In Access 2000, I'm trying to create a switchboard so users can open a certain form with different filters. I thought I would use an option group with toggle buttons. I suppose it could be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.