Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks, Leonardo. I followed those instructions, changing only the cell
reference. However, when I click the button, I get the error message "subscript out of range", and in VB the second line (starting with Selection.Hyperlinks(1)) is highlighted. Any ideas? " wrote: Hi Judge, Try the following: -Add the VB toolbar to your menus: View/Toolbars/Control toolbox -On that menu select the button looking control (sixth icon on my bar) and draw a button on your spreadsheet by dragging your mouse -you should now see a button on your spreadsheet that reads "CommandButton1". -doubleclick on your button, you should get a code window with the following lines: Private Sub CommandButton1_Click() End Sub -Add the following two instructions to your code, just replace A40 with the cell where your hyperlink is; your function should look like this at the end: Private Sub CommandButton1_Click() Range("A40").Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub -Close that window. -On the bar you added look for the "Exit Design Mode" button (first one on my bar). As soon as you click it, you should turn to "play" mode. -If you click on the button, it should action the hyperlink -Just color white the hyperlink text on the cell so the users cannot see it. Hope this helps ;) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create an email macro to auto fill the email? | Excel Discussion (Misc queries) | |||
Button to create a new form | Excel Worksheet Functions | |||
Excel in email form... | Excel Discussion (Misc queries) | |||
How do I create a submit button to an email address in excel? | Excel Discussion (Misc queries) | |||
How do I create a button on the toolbar that will start my form? | Excel Discussion (Misc queries) |