emilt_milut
New Member
- Joined
- Feb 4, 2018
- Messages
- 9
Thank you for your time. I am a real beginner in the VBA and I am asking for your help for the next issue.
I have
A sheet called "START" in which an ActiveX ComboBox named ”CLIENTI” is inserted,
and
A sheet called "CLIENT" in which the Range ”B3:B100” contain hyperlink addresses to various Workbooks
ListFillRange – ”CLIENTI!B3: B100”
LinkedCell – ”CLIENTI!A3”
Sheet files in the list of "CLIENTI" are located in C:\DIANA\TRAD\clienti\
I want to open the selected file from ComboBox by activating the hyperlink
I wrote the following procedure, but it does not work.
Sub Open_pg_client()
'
' Open_pg_client Macro
' Range("J3")=CONCATENATE(G3;A1;H3)
' Range("G3")= file:///C:\DIANA\TRAD\clienti\
' Range("A1") = LinkedCell
' Range("H3") = .xlsx
' Range("K3")=contain the value of Range("J3")
' Range("M5")= HYPERLINK($K$3)
Sheets("CLIENTI").Select
Range("J3").Select
Application.CutCopyMode = False
Selection.Copy
Range("K3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("CLIENTI").Range("M5").Hyperlinks(2).Follow
If GetUserAddress = True Then
MsgBox "Successfully followed hyperlink."
Else
MsgBox "Could not follow hyperlink."
End If
End Sub
I get the error message:
”Run-time error ”9”:
Subscript Out of Range”
Thank you in advance for any help.
Kind Regards
I have
A sheet called "START" in which an ActiveX ComboBox named ”CLIENTI” is inserted,
and
A sheet called "CLIENT" in which the Range ”B3:B100” contain hyperlink addresses to various Workbooks
ListFillRange – ”CLIENTI!B3: B100”
LinkedCell – ”CLIENTI!A3”
Sheet files in the list of "CLIENTI" are located in C:\DIANA\TRAD\clienti\
I want to open the selected file from ComboBox by activating the hyperlink
I wrote the following procedure, but it does not work.
Sub Open_pg_client()
'
' Open_pg_client Macro
' Range("J3")=CONCATENATE(G3;A1;H3)
' Range("G3")= file:///C:\DIANA\TRAD\clienti\
' Range("A1") = LinkedCell
' Range("H3") = .xlsx
' Range("K3")=contain the value of Range("J3")
' Range("M5")= HYPERLINK($K$3)
Sheets("CLIENTI").Select
Range("J3").Select
Application.CutCopyMode = False
Selection.Copy
Range("K3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("CLIENTI").Range("M5").Hyperlinks(2).Follow
If GetUserAddress = True Then
MsgBox "Successfully followed hyperlink."
Else
MsgBox "Could not follow hyperlink."
End If
End Sub
I get the error message:
”Run-time error ”9”:
Subscript Out of Range”
Thank you in advance for any help.
Kind Regards