AW: Formular formatieren
01.12.2011 21:57:33
fcs
Hallo Ralf,
du hast die Internetadresse und die E-Mail-Adresse in die Beschriftung von 2 Labels eingelesen.
Dann müssen in den Code auch 2 entsprechende Klick-Ereignisprozeduren für die Labels eingebaut werden.
Gruß
Franz
Hier dein angepasster Code für dein userform:
Private Sub cmdOk_Click()
Unload Me
End Sub
Private Sub lblErst4_Click()
Dim strLink1 As String
strLink1 = lblErst4.Caption
If LCase(Left(strLink1, 7)) "mailto:" Then
strLink1 = "mailto:" & strLink1
End If
ActiveWorkbook.FollowHyperlink Address:=strLink1, NewWindow:=True
End Sub
Private Sub lblErst5_Click()
Dim strLink2 As String
strLink2 = lblErst5.Caption
If LCase(Left(strLink2, 3)) = "www" Then
strLink2 = "http://" & strLink2
End If
ActiveWorkbook.FollowHyperlink Address:=strLink2, NewWindow:=True
End Sub
Private Sub UserForm_Initialize()
lblVNr.Caption = Tabelle3.Range("B1").Value
lblVDat.Caption = Tabelle3.Range("B2").Value
lblErst1.Caption = Tabelle3.Range("B3").Value
lblErst2.Caption = Tabelle3.Range("B4").Value
lblErst3.Caption = Tabelle3.Range("B5").Value
'lblErst4.Caption = Tabelle3.Range("B6").Value
lblErst4.Caption = Worksheets("Info").Cells(6, 2).Value
lblErst5.Caption = Tabelle3.Range("B7").Value
End Sub