AW: bei mir funktioniert es!
05.12.2013 14:48:25
Peter
Also es funktioniert leider irgendwie alles immer noch nicht. Deswegen hier noch mal die beiden Wege und was jeweils passiert.
1. Variante: Diesen Code habe ich unter Modul1:
Sub StatusGruen()
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.FormulaR1C1 = "Insert hyperlink"
With .Characters(Start:=1, Length:=2).Font
.Name = "Arial"
.FontStyle = "Standard"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End With
Und diesen Code unter der entsprechenden Tabelle:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("E10:AA140")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
MsgBox "Changed cell(s): " & Selection.Address
Private Sub Worksheet_DoubleClick(ByVal Target As Range)
If Target = "Insert hyperlink" Then
Application.Dialogs(xlDialogInsertHyperlink).Show
End If
End Sub
Dabei passiert gar nichts.
Wenn ich das gleiche mache ( Variante 2 ) mit selection anstelle von DoubleClick, dann muss ich immer erst eine andere Zeile anwählen, bis das Fenster für den Hyperlink öffnet.
Danke und LG