Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Create a form button for email

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create an email macro to auto fill the email? Justin[_4_] Excel Discussion (Misc queries) 0 November 14th 07 10:49 PM
Button to create a new form ihatetheredskins Excel Worksheet Functions 1 May 3rd 07 07:43 PM
Excel in email form... bplumm01 Excel Discussion (Misc queries) 1 August 5th 06 04:29 PM
How do I create a submit button to an email address in excel? farhospurchase Excel Discussion (Misc queries) 1 August 1st 06 08:56 PM
How do I create a button on the toolbar that will start my form? DMB Excel Discussion (Misc queries) 0 January 8th 06 11:00 PM


All times are GMT +1. The time now is 12:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"