Risultati da 1 a 3 di 3

Discussione: semplificazione macre



  1. #1
    L'avatar di joondeep
    Clicca e Apri
    Data Registrazione
    Dec 2015
    Località
    Olbia
    Età
    43
    Messaggi
    10
    Versione Office
    Excel 2013
    Likes ricevuti
    0
    Likes dati
    0

    semplificazione macre

    Salve ragazzi, mi potete dire se é possibile semplificare le macro che posto? sono collegate a due pulsanti di controllo.
    Le utilizzo per modificare i valori VERO/FALSO di una serie di caselle di controllo(controllo Modulo) di modo che venga messa o tolta la spunta
    in alcuni nomi di una lista a seconda che venga premuto l'uno o l'altro pulsante


    Codice: 
    Sub La_Maddalena()
    '
    ' La_Maddalena Macro
    '
    
    
    '
        Range("I10").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I13").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I15").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I16").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I17").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I18").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I19").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I20").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I21").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I22").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I23").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I24").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I27").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I28").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I29").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I30").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I32").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I34").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I35").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I36").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I37").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I38").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I39").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I40").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I41").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I42").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I45").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I46").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I50").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I54").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I56").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I58").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I59").Select
        ActiveCell.FormulaR1C1 = "TRUE"
        Range("I61").Select
        ActiveWindow.SmallScroll Down:=-90
    End Sub
    Sub Normale()
    '
    ' Normale Macro
    '
    
    
    '
          
        Range("I10").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I13").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I15").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I16").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I17").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I18").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I19").Select
        ActiveWindow.SmallScroll Down:=6
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I20").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I21").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I22").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I23").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I24").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I26").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I27").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I28").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I29").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I30").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I32").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I33").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I35").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I37").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I38").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I39").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I40").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I41").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I42").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I45").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I46").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I48").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I49").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I50").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I54").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I55").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I56").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I58").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I59").Select
        ActiveCell.FormulaR1C1 = "FALSE"
        Range("I61").Select
        ActiveWindow.SmallScroll Down:=-90
    End Sub

  2. #2

    L'avatar di Rubik72
    Clicca e Apri
    Data Registrazione
    Dec 2015
    Località
    Cosenza
    Età
    45
    Messaggi
    2808
    Versione Office
    Excel 2013
    Likes ricevuti
    1020
    Likes dati
    979
    Codice: 
        Range("I10,I13,I15,I16,I17:I24,I26:I30,I32:I42,I45:I46,I48:I50,I54:I56,I58:I59").FormulaR1C1 = "FALSE"
        Range("I10,I13,I15,I16,I17:I24,I26:I30,I32:I42,I45:I46,I48:I50,I54:I56,I58:I59").FormulaR1C1 = "TRUE"
    Ma fa esattamente la stessa cosa, è solo esteticamente più "bella"

  3. I seguenti utenti hanno dato un "Like"


  4. #3
    L'avatar di joondeep
    Clicca e Apri
    Data Registrazione
    Dec 2015
    Località
    Olbia
    Età
    43
    Messaggi
    10
    Versione Office
    Excel 2013
    Likes ricevuti
    0
    Likes dati
    0
    Gentilissimo e velocissimo, funziona e non si vede il refresh, oltre ad essere più semplice nel caso la debba modificare. Mille grazie

Permessi di Scrittura

  • Tu non puoi inviare nuove discussioni
  • Tu non puoi inviare risposte
  • Tu non puoi inviare allegati
  • Tu non puoi modificare i tuoi messaggi
  •