Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 80 lines (63 sloc) 2.94 kB
71cb477 @emilefyon Update of filenames
authored
1 Attribute VB_Name = "LIB_RangeActions"
29488ee Signed-off-by: unknown <EMFYON@LBNL07489.corp.capgemini.com>
unknown authored
2
3
4 '---------------------------------------------------------------------------------------------------------------------------------------------
5 '
6 ' Range Actions Library v0.1
7 '
8 '
9 ' Functions lists
10 ' ---------------
11 '
12 ' + Sub addLinks () : add an hyperlink to all the cells in the current selection. The URL will be the content of the cell
13 ' * Specifications / limitations
14 ' - None
15 ' * Arguments
16 ' - None
17 ' + Sub addLink (ByVal url As String, ByVal cell As Range) : add an hyperlink to cell given in argument to the URL given in argument. The URL will be the content of the cell
18 ' * Specifications / limitations
19 ' - None
20 ' * Arguments
21 ' - ByVal url As String the URL the cell must point to
22 ' - ByVal cell As Range the cell to add the link
23 '
24 ' Revisions history
25 ' -----------------
26 ' - Emile Fyon 11/07/2012 v0.1 Creation
27 '
28 '---------------------------------------------------------------------------------------------------------------------------------------------
29
30
31
32
33 '---------------------------------------------------------------------------------------------------------------------------------------------
34 ' + Sub addLinks () : add an hyperlink to all the cells in the current selection. The URL will be the content of the cell
35 ' * Specifications / limitations
36 ' - None
37 ' * Arguments
38 ' - None
39 '
40 ' Last edition date : 11/07/2012
41 '
42 ' Revisions history
43 ' -----------------
44 ' - Emile Fyon 11/07/2012 Creation
45 '
46 '---------------------------------------------------------------------------------------------------------------------------------------------
47
48 Sub addLinks()
49
50 For Each cell In Selection
51 Call addLink(cell.Value, cell)
52 Next
53
54 End Sub
55
56 '---------------------------------------------------------------------------------------------------------------------------------------------
57 ' + Sub addLink (ByVal url As String, ByVal cell As Range) : add an hyperlink to cell given in argument to the URL given in argument. The URL will be the content of the cell
58 ' * Specifications / limitations
59 ' - None
60 ' * Arguments
61 ' - ByVal url As String the URL the cell must point to
62 ' - ByVal cell As Range the cell to add the link
63 '
64 ' Last edition date : 11/07/2012
65 '
66 ' Revisions history
67 ' -----------------
68 ' - Emile Fyon 11/07/2012 Creation
69 '
70 '---------------------------------------------------------------------------------------------------------------------------------------------
71
72 Sub addLink(ByVal url As String, ByVal cell As Range)
73
74 cell.Worksheet.Hyperlinks.Add Anchor:=cell, Address:=url
75
76
77 End Sub
78
79
Something went wrong with that request. Please try again.