VBA e Google Drive



  • VBA e Google Drive
    di Alexyr (utente non iscritto) data: 04/09/2017 16:10:08

    Salve a tutti,
    Ho un problema: Ho creato un doc excel in locale con del codice VBA. Questo file dovrà essere trasferito su Google Drive per essere utilizzato/visualizzato da più persone. Chiaramente tutto quanto fatto in VBA su Drive non mi funziona. La soluzione è scrivere lo stesso codice in JS?
    Vi elenco qui di seguito i pezzi di codice:

    1: Trasforma il testo scritto in maiuscolo

    2: Colora un intervallo di celle in base alla data, togliendo la protezione del foglio e rimettendola alla fine

    3: All'apertura del documento si posiziona in un foglio ed in una cella specifica in base alla data:

    Qualcuno può aiutarmi?

    Grazie in anticipo.

    Ale

     
    Private Sub Worksheet_Change(ByVal Target As Range)
      Dim cella As Excel.Range
      Application.EnableEvents = False
      For Each cella In Range("D4:CR76")
       With cella
        If Not .Value = vbEmpty Then
         .Value = UCase(.Value)
            End If
        End With
      Next
      Application.EnableEvents = True
    End Sub 
    
    Private Sub Worksheet_Activate()
        Dim Riga As Integer
        Dim Col As Integer
           ActiveSheet.Unprotect "password"
           Range("R4:NZ32").Interior.ColorIndex = xlNone
             For Col = 18 To 390
                If Cells(1, Col) = 6 Or Cells(1, Col) = 7 Then
                    For Riga = 4 To 32
                        Cells(Riga, Col).Interior.ColorIndex = 15
                    Next
                End If
            Next
            ActiveSheet.Protect "password", AllowFiltering:=True
    End Sub
    
    Private Sub Workbook_Open()
      Dim m As Integer
      Dim d As Integer
      Dim I As Integer
      Dim C As Integer
       m = Month(Date)
       d = Day(Date)
       C = 0
        For I = 1 To d
         C = C + 3
        Next
       Sheets(m).Activate
       Cells(4, C + 1).Activate
     End Sub