presenza iperlink



  • presenza iperlink
    di gobbo (utente non iscritto) data: 04/12/2013 21:32:29

    come posso sapere se in una cella è presente un collegamento ipertestuale ad un file (es. un pdf di una fattura, di un documento oppure ad un cartella esterna) in modo di poter attivare una formattazione condizionale
    grazie per l'aiuto



  • di totygno71 data: 04/12/2013 21:49:40

    Prova questo ti crea un foglio nuovo hyper con l'elenco completo di tutti gli hyper
     
    Sub linkamelo_tutto()
      Dim rCell As Range
      Dim ws As Worksheet
      Dim Lhyper As Long
      On Error Resume Next
      Application.DisplayAlerts = False
      Sheets("Hypers").Delete
      On Error GoTo 0
      Application.DisplayAlerts = True
      Sheets.Add().Name = "Hypers"
    
      For Each ws In Worksheets
        If ws.Name <> "Hypers" Then
          For Lhyper = 1 To ws.UsedRange.Hyperlinks.Count
            ws.Hyperlinks(Lhyper).Range.Copy
            With Sheets("Hypers").Cells(Rows.Count, 1).End(xlUp)
              .Offset(1, 0).PasteSpecial
              .Offset(1, 1) = ws.Hyperlinks(Lhyper).Range.Address
            End With
            Application.CutCopyMode = False
           Next Lhyper
         End If
      Next ws
    End Sub
    



  • di Grograman (utente non iscritto) data: 05/12/2013 09:50:41

    Altro esempio, nel commento va messo il codice per la formattazione condizionale:
     
    Option Explicit
    
    Sub Nomesub()
      Dim wb As Workbook
      Dim ws As Worksheet
      
      Dim rngC As Range, Cella As Range
      
      Set wb = ThisWorkbook
      Set ws = wb.Sheets(1)
      
        With ws
          Set rngC = .Range("A1:D10") ''modificare secondo necessità
          For Each Cella In rngC
            If Cella.Hyperlinks.Count > 0 Then
              ''applico la formattazione condizionale
            End If
          Next Cella
          Set rngC = Nothing
        End With
      
      Set ws = Nothing
      Set wb = Nothing
    End Sub
    


  • codici condizionale
    di gobbo (utente non iscritto) data: 05/12/2013 12:39:13

    Grazie per le risposte ma forse non mi sono spiegato.
    Io vorrei sapere (modificando il colore della cella) se in essa é contenuto un hyper.
    Non vorrei (anche se ritengo mi verrà utile) aprire un nuovo foglio dove sono elencate tutte le celle e tutti gli Hyper presenti ma inserire nel foglio che ho già un meccanismo automatico che mi segnali quando una cella é collegata ad un Hyper e quando non lo é
    Mi scuso per la mia ignoranza in materia, ma non so il codice da inserire per la formattazione condizionale

    Grazie




     
    					
    					
    					
    					
    					
    					
    					
    					
    



  • di totygno71 (utente non iscritto) data: 05/12/2013 12:46:05

    bhe allora il codice del buon grò fa proprio a caso tuo!