
Private Sub CommandButton1_Click()
Dim Nome
If Range("d30") = "" Then
Nome = InputBox(prompt:="Digita Codice ISIN : ", Title:="Ricerca i Dati in internet")
If Nome = "" Then
MsgBox "Operazione annullata non hai inserito il codice"
Else
If Nome <> "" Then
MsgBox "Va al sito"
End If
End If
End If
End Sub |
' per concatenare
Sub Concatena()
Dim a, b, c, z
a = Range("a1")
b = Range("a2")
c = Range("b1")
z = a + b + c
Range("c1").Value = z
End Sub
' per trasformare il testo in link
Sub hyper()
'Trasforma un link dal testo di una cella in questo caso A1 (naturalmente qui deve trasformare
' la cella concatenata
Riga = Cells(Rows.Count, 1).End(xlUp).Row
For y = 1 To Riga
x = Cells(y, 1).Text
Cells(y, 2).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=x
Next y
End Sub
|
'Pre concatenare celle fai cosi Sub commandbutton1_click() x = Cells(2, 1) & Cells(2, 2) & Cells(2, 3) Cells(2, 4) = x End Sub |
