Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 16th, 2003, 12:40 PM
allmad allmad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 17 allmad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 sec
Reputation Power: 0
Excel-VB hyperlink

Right Im new to VB and I am trying to add a button on my excel spread sheet that with open the defult browser to a fixed page on the web.

Trouble is I havent got a clue how the code sould read.

Can anyone help plz?

Mark

Reply With Quote
  #2  
Old July 17th, 2003, 02:57 PM
nao's Avatar
nao nao is offline
junior vice president
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2002
Location: Springfield
Posts: 251 nao User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
hyperlinks

Hello Allmud,

Create a hyperlink to an existing file or Web page

Right-click the text or graphic you want to represent the hyperlink, and then click Hyperlink on the shortcut menu.

Under Link to on the left side of the dialog box, click Existing File or Web page.

Do one of the following: To select a file from the current folder, click Current Folder and then click the file you want to link to.

To select the Web page from a list of browsed pages, click Browsed Pages and then click the Web page you want to link to.

To select a file from a list of files you have recently used, click Recent Files and then click the file you want to link to.

If you know the name and location of the file or Web page you want to link to, you can type that information in the Address box.

To select the Web page by opening your browser and searching for the page, click Browse the Web , open the Web page you want to link to, and then switch back to Microsoft_Excel without closing your browser.

To assign a tip to be displayed when you rest the pointer on the hyperlink, click ScreenTip and then type the text you want in the ScreenTip text box. Click OK.


Create a hyperlink to a specific location on a Web page

To create a hyperlink to a specific location on a Web page, make sure the Web page has a bookmark at that location.

In Microsoft Excel, right-click the text or graphic you want to represent the hyperlink, and then click Hyperlink on the shortcut menu.

Under Link to on the left side of the dialog box, click Existing file or Web page.

Do one of the following: To select a Web page from the current folder, click Current Folder and then click the Web page you want to link to.

To select the Web page from a list of browsed pages, click Browsed Pages and then click the Web page you want to link to.

To select a Web page from a list of files you have recently used, click Recent Files and then click the Web page you want to link to.

If you know the name and location of the Web page you want to link to, you can type that information in the Address box.

To select the Web page by opening your browser and searching for the page, click Browse the Web , open the Web page you want to link to, and then switch back to Excel without closing your browser.

Click Bookmark, and then double-click the bookmark you want.

To assign a tip to be displayed when you rest the pointer on the hyperlink, click ScreenTip, type the text you want in the ScreenTip text box, and then click OK.


I found this in the Excel help files - all I typed was 'Hyperlink' and it gave me a lot of info (more than I've posted). Help files (esp., on MS products) are generally the best place to start if you're looking for info. It's also a good place to pick-up the right kind of terms/lingo so you can refine your searches.

Hope this helps,

nao
__________________
NAO'S DISCLAIMER
YOU MAY FREELY APPLY, ENTIRELY AT YOUR OWN RISK, ANY ADVICE,
IDEAS, METHODOLOGIES OR CODE CONTAINED IN THIS POSTING.

Reply With Quote
  #3  
Old July 18th, 2003, 09:06 AM
allmad allmad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 17 allmad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 sec
Reputation Power: 0
Thanx for the info and the time to repley, but I can do a hyperlink in excel. What Im trying to do is make a button in the control panel (which is no problem) and when you click that button, and it depresses, it opens the defult brouser to a web page.
So I need to know what VB code to put in the buttons propertys to hyperlink.

Ive enclosed a pic of what I meen.

Ive got round it a bit by makeing a link in a cell then linking button to that. It works but there must be another, more direct way


Mark

Reply With Quote
  #4  
Old July 18th, 2003, 09:09 AM
allmad allmad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 17 allmad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 sec
Reputation Power: 0
right heres that pic of what i meen
Attached Images
File Type: jpg hypo.jpg (38.2 KB, 514 views)

Reply With Quote
  #5  
Old October 12th, 2003, 10:59 PM
galaganut galaganut is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 23 galaganut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 44 m 17 sec
Reputation Power: 0
Wink

Try something like this...
Code:
Sub toweb()
ActiveWorkbook.FollowHyperlink Address:= _
        "http://www.google.com/", NewWindow:= _
        False, AddHistory:=True
    Application.WindowState = xlNormal
End Sub


That is your macro in a regular module, then the code in your command button_click should look like this...
Code:
Private Sub CommandButton1_Click()
toweb
End Sub

Just substitute the google address for your webpage.

Chuck

Reply With Quote
  #6  
Old October 13th, 2003, 07:01 AM
allmad allmad is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 17 allmad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 sec
Reputation Power: 0
Thanks for that, worked a treat.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Excel-VB hyperlink


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT