forked from Vitosh/VBA_personal
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGotoInternet.vb
35 lines (24 loc) · 1006 Bytes
/
GotoInternet.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Public Sub Clicked(Optional b_logo As Boolean = False)
Dim ie As Object
Dim s_WebSites() As Variant
On Error GoTo Clicked_Error
If b_logo Then
s_WebSites = Array("https://www.facebook.com", _
"https://plus.google.com", _
"http://www.youtube.com")
Else
s_WebSites = Array("http://www.hoai.de/online/hoai_rechner")
End If
' s_WebSites = Array("https://goo.gl/c3Gzqi", _
' "https://goo.gl/JKvYR6", _
' "https://goo.gl/eLuMFN", _
' "https://goo.gl/r2OMeQ")
Set ie = CreateObject("Internetexplorer.Application")
ie.Visible = True
ie.Navigate s_WebSites(make_random(0, UBound(s_WebSites)))
Exit Sub
On Error GoTo 0
Exit Sub
Clicked_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Clicked of Module mod_main"
End Sub