Welcome to MacForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

using loop to write directory contents as hyperlinks

 
   Macintosh computer (Home) -> Excel RSS
Next:  Delay when launching a hyperlink  
Author Message
gls2815

External


Since: May 22, 2006
Posts: 2



(Msg. 1) Posted: Mon Jun 12, 2006 2:53 pm
Post subject: using loop to write directory contents as hyperlinks
Archived from groups: microsoft>public>mac>office>excel (more info?)

Hi,

I have a looping sub statement that JE wrote that writes the filenames
of all the excel files contained in a directory into the active
workbook. Here it is:
========================
Sub LoopThroughXLS()

Const nMACPATH As String = _
"users:gerard:Desktop:Bids-Accepted:"
Dim nCount As Long
Dim sFName As String
#If Mac Then
sFName = Dir(nMACPATH, MacID("XLS8"))
#Else
sFName = Dir("*.xls")
#End If
Do While Len(sFName) > 0
Cells(4 + nCount, 2).Value = sFName
nCount = nCount + 4
sFName = Dir
Loop
End Sub
========================
My question is can the resulting filename be turned into a hyperlink
that in turn opens the file in Excel when clicked?

Thanks,

G

 >> Stay informed about: using loop to write directory contents as hyperlinks 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Excel All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]