SV650.org - SV650 & Gladius 650 Forum



Idle Banter For non SV and non bike related chat (and the odd bit of humour - but if any post isn't suitable it'll get deleted real quick).
There's also a "U" rating so please respect this. Newbies can also say "hello" here too.

Reply
 
Thread Tools
Old 01-03-06, 05:29 PM   #1
Supervox
No more Mr Nice Guy
Mega Poster
 
Supervox's Avatar
 
Join Date: Jun 2005
Location: Saaafffend, innit !!
Posts: 1,365
Default MS Excel - Help Required

I need to create 6 buttons in a spreadsheet each with a hyperlink to a different webpage.
Unfortunately, I know NOTHING about Visual Basic.

I am sure that one of you will take pity on me & help me out !!
__________________
Never argue with an idiot - he'll drag you down to his level and then beat you with experience
Supervox is offline   Reply With Quote
Old 01-03-06, 06:11 PM   #2
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

I have only ever needed one form button to a site, but you could get more easly. There may be a better way to do this.

Go into the VB editor under Macros and add the folowing code.
Code:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal _
lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Create extra lines using this code under the code added above, change the GotoURL to something diffrent for each url and also modify the url.
Code:
Sub GotoURL()
    ShellExecute 0&, vbNullString, "www.google.co.uk", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
Create a form button and assign it to a macro to go to a certian website.
It will open the default browser and show the site.

This is a long winded way but i cant remember how to pass variables from the form button into VB so the code does not have to be as long.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 01-03-06, 06:47 PM   #3
Blue Flame
Member
Mega Poster
 
Blue Flame's Avatar
 
Join Date: Feb 2004
Location: Fife, Scotland
Posts: 1,265
Default

Don't think you need to go to all that bother.

Just create your own buttons using the draw toolbar facility. Right click on each of the finished images and click on the 'hyperlink' option to add your web pages in.

Job done
__________________
Triumph Sprint GT 1050 -Sexy Phantom Black; Powerbronze Screen

Previous >> K3 SV650S - Candy Copper;Lower Fairing Set;Fender Extender; Powerbronze Screen; HEL Braided Lines;
Blue Flame is offline   Reply With Quote
Old 01-03-06, 07:07 PM   #4
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

I think you cant do that , I tried it in my excel, the Hyperlink option does not come up for form buttons.

PS. Ah sorry misread your message, yep if its a drawn object then yes you can, but if its a form button you cant. But using the drawn box does not give the same clicky effect that a form button would.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 01-03-06, 07:51 PM   #5
Supervox
No more Mr Nice Guy
Mega Poster
 
Supervox's Avatar
 
Join Date: Jun 2005
Location: Saaafffend, innit !!
Posts: 1,365
Default

Thanks for your help guys - the button DOES need to look as though it's been 'pushed' - lots of people with even less idea than me are gonna be using these links !!

Cheers !!
__________________
Never argue with an idiot - he'll drag you down to his level and then beat you with experience
Supervox is offline   Reply With Quote
Old 01-03-06, 10:30 PM   #6
Rob S (Yella)
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Supervox
Thanks for your help guys - the button DOES need to look as though it's been 'pushed' - lots of people with even less idea than me are gonna be using these links !!

Cheers !!
You could put a macro/vb on the button so when it's pressed it changes colour or gets a shadow effect so you can tell its been pressed. You might need another to reset the buttons to the default colour/type when you close the sheet.

Thats how I would do it but there must be easier and more more efficient ways to do it.
  Reply With Quote
Old 01-03-06, 11:52 PM   #7
Blue Flame
Member
Mega Poster
 
Blue Flame's Avatar
 
Join Date: Feb 2004
Location: Fife, Scotland
Posts: 1,265
Default

OK I've got the answer for this one.

Use the 'Controls Toolbox' toolbar to add a 'command button' to your spreadsheet. (IE not the forms toolbar)

You are then able to use the hyperlink button on the 'standard' toolbar to assign a web page to the button you have just created. (Note that the 'right click menu' does not give you the option for hyperlink therefore you must use the hyperlink button on the standard toolbar)

Hope this is of use.
__________________
Triumph Sprint GT 1050 -Sexy Phantom Black; Powerbronze Screen

Previous >> K3 SV650S - Candy Copper;Lower Fairing Set;Fender Extender; Powerbronze Screen; HEL Braided Lines;
Blue Flame is offline   Reply With Quote
Old 01-03-06, 11:58 PM   #8
TSM
The Sick Man
Mega Poster
 
TSM's Avatar
 
Join Date: Nov 2004
Location: Peckham.SE.LDN
Posts: 4,768
Default

That does not work either, just tried it.

Well it does and does not work. If you are still in Design Mode then it will work, when you exit Design Mode it stops working.
__________________
OTR: KTM 690 Duke R 2015 Full Akro
SIDELINE: Kwak ZX636 A1P 2002, Red, R&G's, Yoshi, Double Bubble Screen
GONE: Kwak ZX-7R P1, Full Akro, Undertray, Screen
GONE: SV650S K2 Very Bruised & Without Fairing, Motovation Frame Sliders, R&G Ally Sprocket Toe Protector, HEL 2 Line Setup, GSXR K1 600 RWU Forks, Barnett Clutch & Springs, Penske 8981 Shock, Gilles Ti Rearsets, Steel Barends, Scottoiler, AFAM Chain & Sprockets, Twin FIAMM Horns, Skidmarx Bellypan, Full Micron Zeta Steel System, Cut down undertay.

Forum Problems & Information / Site Suggestions
TSM is offline   Reply With Quote
Old 02-03-06, 12:01 AM   #9
Blue Flame
Member
Mega Poster
 
Blue Flame's Avatar
 
Join Date: Feb 2004
Location: Fife, Scotland
Posts: 1,265
Default

Quote:
Originally Posted by TSM
That does not work either, just tried it.

Well it does and does not work. If you are still in Design Mode then it will work, when you exit Design Mode it stops working.
Hmm i'm confused with that. It seems to work for me. I assume that clicking anywhere else on the spreadsheet takes it out of design mode? Cos after I have done that the link works.

OOPs strike that. Back to the drawing board
__________________
Triumph Sprint GT 1050 -Sexy Phantom Black; Powerbronze Screen

Previous >> K3 SV650S - Candy Copper;Lower Fairing Set;Fender Extender; Powerbronze Screen; HEL Braided Lines;
Blue Flame is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Graciepants Idle Banter 15 31-03-09 10:52 PM
Excel geeks, please... Filipe M. Idle Banter 12 28-08-08 10:04 PM
Cheapest MS Excel? Nekkid Idle Banter 7 22-01-07 03:19 PM
Excel question nickj Idle Banter 3 04-09-06 12:35 PM
Microsoft Excel anybody? skidmarx Idle Banter 15 19-03-06 07:20 PM


All times are GMT. The time now is 11:24 PM.


Powered by vBulletin® - Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.