Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Using a macro in excel to hyperlink files

I would like a macro to do the following:

Refer to a list of files in a folder (all with the suffix .htm)
Create a list of the files in excel using their filename as the info
to enter into the cell
Finally hyperlink each filename in excel to its repective file

It would be better if the data in the cell did not have the file's
suffix at the end of the filename e.g. car.htm

Any help would be very much appreciated.

Regards,
David
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,549
Default Using a macro in excel to hyperlink files


Glad to send along the trial version of my Excel add-in "List Files".
You can specify the file extension and folder or folder/sub-folders.
You get hyperlinked files with a grouping option.
Send an email to james.coneXXX at comcast.netXXX (remove the xxx).
Please include your real name and geographic location.
--
Jim Cone
Portland, Oregon USA




wrote in message
I would like a macro to do the following:
Refer to a list of files in a folder (all with the suffix .htm)
Create a list of the files in excel using their filename as the info
to enter into the cell
Finally hyperlink each filename in excel to its repective file

It would be better if the data in the cell did not have the file's
suffix at the end of the filename e.g. car.htm
Any help would be very much appreciated.
Regards,
David
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default Using a macro in excel to hyperlink files

You can follow following steps:-
1.Enable macro in your excel sheet
2.Right click on toolbaradd Control Toolbox
3.Add a command button from control toolbox on the sheet
4.Give the caption, the file name you want to browse
5.Right click on command button view code
6.In CommandButton1_Click() add following code:-


Private Sub CommandButton1_Click()
Const url As String = "d:/forum.txt" ' this depicts the file path

Dim ie As Object

Set ie = CreateObject("internetexplorer.application") ' this opens the
file in IE

With ie

.Visible = True

.navigate url

End With

Set ie = Nothing

End Sub


Enjoy.......



Chris
------
Convert your Excel spreadsheet into online calculator.
http://www.spreadsheetconverter.com

--
Chris
------
Convert your Excel spreadsheet into online calculator.
http://www.spreadsheetconverter.com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200901/1

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
EXCEL 2003 : HYPERLINK() with .JPG extension files Noel Links and Linking in Excel 0 August 31st 07 09:34 AM
Using a hyperlink to backup Excel files Colin Hayes Excel Worksheet Functions 7 May 4th 07 11:06 PM
need to hyperlink to 100 files in the excel sheet anil Excel Discussion (Misc queries) 1 March 14th 07 03:40 PM
How to hyperlink pdf files in excel spreadsheet Damian Excel Discussion (Misc queries) 0 February 27th 06 10:59 AM
Look up actual files from a list in excel and enter as a hyperlink AlistairM Excel Discussion (Misc queries) 0 January 23rd 06 10:36 AM


All times are GMT +1. The time now is 11:15 AM.

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"