![]() |
Message Boxes and Hyperlinks
I have set up a spreadsheet that has a few hyperlinks on it to web pages.
These pages require passwords and unser names to view them. I want to display a message box each time a hyperlink is clicked on that will tell the user what password and username they should be using for that particular site.... I just don't seem to be having any luck - can anybody help? |
Message Boxes and Hyperlinks
how are you trying to get this to happen?
what version of excel? -- Regards, Tom Ogilvy "George" wrote in message ... I have set up a spreadsheet that has a few hyperlinks on it to web pages. These pages require passwords and unser names to view them. I want to display a message box each time a hyperlink is clicked on that will tell the user what password and username they should be using for that particular site.... I just don't seem to be having any luck - can anybody help? |
Message Boxes and Hyperlinks
I've done something similar.
First, draw a rectangle around the cell containing the hyperlink (let's assume the link is in cell A1). N.B. You need to set the Fill Color to No Fill and the Line Color to No Line otherwise you won't see the link underneath. Paste this into the VB editor: Public Sub Link1() MsgBox "Username = <whatever Password = <whatever" Cells(1, 1).Select Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True End Sub Assign the Link1 macro to the rectangle and it will display the message whenever cell 1,1 (A1) is clicked and follow the hyperlink. Hope this helps. Rob "George" wrote: I have set up a spreadsheet that has a few hyperlinks on it to web pages. These pages require passwords and unser names to view them. I want to display a message box each time a hyperlink is clicked on that will tell the user what password and username they should be using for that particular site.... I just don't seem to be having any luck - can anybody help? |
Message Boxes and Hyperlinks
WooHoo!!! It works! Thank-you so much for your help
"Rob Docherty" wrote: I've done something similar. First, draw a rectangle around the cell containing the hyperlink (let's assume the link is in cell A1). N.B. You need to set the Fill Color to No Fill and the Line Color to No Line otherwise you won't see the link underneath. Paste this into the VB editor: Public Sub Link1() MsgBox "Username = <whatever Password = <whatever" Cells(1, 1).Select Selection.Hyperlinks(1).Follow NewWindow:=True, AddHistory:=True End Sub Assign the Link1 macro to the rectangle and it will display the message whenever cell 1,1 (A1) is clicked and follow the hyperlink. Hope this helps. Rob "George" wrote: I have set up a spreadsheet that has a few hyperlinks on it to web pages. These pages require passwords and unser names to view them. I want to display a message box each time a hyperlink is clicked on that will tell the user what password and username they should be using for that particular site.... I just don't seem to be having any luck - can anybody help? |
All times are GMT +1. The time now is 12:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com