Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Help Needed Creating Hyperlinks from a userform

Thks a7n9

Listbox is working a treat.

I have added the code to the enter button but it is not looping correctly -
i want to enter the file names as hyperlinks and am using the following code
- the first hyperlink is to be inserted in column 22 with the next in column
23 and so on -
Where am I going wrong? at present it just enters the last file selected
into column 22
' Transfer the hyperlinks

For i = 1 To mylistbox.ListCount
j = 22
ActiveSheet.Hyperlinks.Add Anchor:=Cells(nextrow, j),
Address:=mylistbox.List(i - 1)
j = j + 1
Next i

Also is it possible to show the filenames only without the paths being
visible?

Thanks for your help
"a7n9" wrote:


Hi,

You could create a listbox on your form, and keep adding the items from
the selection to that list box.

In your loop, you can add a simple line refering to your list box and
add the selected items by using the propery AddItem, for example,

For i = LBound(FileName) To UBound(FileName)
Msg = Msg & FileName(i) & vbCrLf
mylistbox.Additem FileName(i)
Next i

Then in the Enter button, copy the contents of the ListBox to the
worksheet using following loop:

For i = 1 to mylistbox.Listcount
j=12
Range("A" & j) = mylistbox.List(i-1)
j=j+1
Next i


--
a7n9


------------------------------------------------------------------------
a7n9's Profile: http://www.excelforum.com/member.php...o&userid=32149
View this thread: http://www.excelforum.com/showthread...hreadid=563262


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
creating hyperlinks David Baker Excel Discussion (Misc queries) 2 December 21st 08 06:08 PM
Creating hyperlinks Fred Excel Discussion (Misc queries) 0 February 21st 07 03:13 PM
Hyperlinks on UserForm anar_baku[_15_] Excel Programming 1 May 9th 06 06:18 PM
creating hyperlinks Archana Jain Excel Worksheet Functions 1 November 14th 05 04:56 AM
Hyperlinks from UserForm Controls Nigel[_5_] Excel Programming 3 November 1st 03 01:21 PM


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