LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA to email a hyperlink from a textbox


OK, here goes.......

I have an excel spreadsheet on a network, and I need to be able to
email a link to the spreadsheet to everyone who needs to use it.

I have done the formula =cell("filename") to get the filepath, i have
created a userform which initialises textbox1 to pick up the filename.
I have written a macros to create an email, it puts in the subject and
the body of the message. In the body of the message is the value of
textbox1, but i cannot get it to format this filepath as a hyperlink.

Here's the code in it's entirity i have done:



Private Sub CommandButton1_Click()
ESubject = "A Workbook has been created which requires your input."

SendTo = ""
CCTo = ""
Msg = "Please click on this link to access the new workbook : "

msg2 = TextBox1.Value
Set App = CreateObject("Outlook.Application")
Set Itm = App.CreateItem(0)
With Itm
..Subject = ESubject
..To = SendTo
..CC = CCTo
..body = Msg & vbCrLf & vbCrLf & msg2
..Display
End With
Set App = Nothing
Set Itm = Nothing
Unload Me
End Sub


Private Sub UserForm_Initialize()
TextBox1.Value = Sheets("calcs").Range("b36").Value
End Sub


ANy help anyone could offer would be greatly appreicated :-)


--
doodlebug
------------------------------------------------------------------------
doodlebug's Profile: http://www.excelforum.com/member.php...o&userid=25902
View this thread: http://www.excelforum.com/showthread...hreadid=392819

 
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
Email addresses won't hyperlink in Excel Bodye Excel Discussion (Misc queries) 1 February 10th 09 01:57 PM
How to set up a hyperlink in excel to email the doc as attachment Mrs Doubtfire Excel Discussion (Misc queries) 1 January 19th 07 08:34 PM
Excel Email Hyperlink Bug jcpotwor Excel Discussion (Misc queries) 0 April 21st 06 02:17 PM
Add hyperlink to body of email thru Excel MAYDAY[_5_] Excel Programming 3 July 7th 05 09:03 PM
Email hyperlink changes not showing in excel Nancy Excel Worksheet Functions 0 May 13th 05 12:26 AM


All times are GMT +1. The time now is 10:15 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"