Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you very much Alex,
It worked a treat. Tanya "Alex Simmons" wrote: On Apr 13, 12:51 pm, Tanya wrote: Hi I have 5 cells [range is I13:I17] each with a hyperlink to a wav file and I would like to have a macro that randomly selects these cells to enable the hyperlink. Is this possible? cheers Tanya This code will work and follow the hyperlink: Sub RandomLink() Dim rngTargetCell As Range Dim iRandomNumber As Integer Set rngTargetCell = Nothing Randomize iRandomNumber = Int(5 * Rnd + 13) Set rngTargetCell = Range("I" & iRandomNumber) rngTargetCell.Hyperlinks(1).Follow End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
select and copy 100 random cells from a range in a source workbook | Excel Worksheet Functions | |||
select random value in a range of cells | Excel Discussion (Misc queries) | |||
Select random cell | Excel Worksheet Functions | |||
VBA to select a defined range | Excel Programming | |||
Select a random cell < 1 | Excel Programming |