Sub Macro()
Range("F5:F23").Select
Selection.FormatConditions.AddIconSetCondition
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1)
.ReverseOrder = False
.ShowIconOnly = True
.IconSet = ActiveWorkbook.IconSets(xl3Symbols2)
End With
Selection.FormatConditions(1).IconCriteria(1).Icon = xlIconYellowExclamation
With Selection.FormatConditions(1).IconCriteria(2)
.Type = xlConditionValueNumber
.Value = 0
.Operator = 7
.Icon = xlIconRedCross
End With
With Selection.FormatConditions(1).IconCriteria(3)
.Type = xlConditionValueNumber
.Value = 1
.Operator = 7
.Icon = xlIconGreenCheck
End With
Application.DisplayAlerts = False
For Each WS In Worksheets
If WS.Name <> "RECAP INDICATORI" Then WS.Delete
Next
Application.DisplayAlerts = True
Sheets("RECAP INDICATORI").Cells(1, 3).Value = "dal " & Sheets("RECAP INDICATORI").Cells(1, 10) & " al " & Sheets("RECAP INDICATORI").Cells(1, 11).Value
Caricamento
Recap
'*************************************** PASSI FINALI ***********************************************
'****************************************************************************************************
Msg = "Procedere con la suddivisione dei risultati?"
Ans = MsgBox(Msg, vbYesNo)
If Ans = vbYes Then Call Sportello
' Call Sportello
NomeOutput = ThisWorkbook.Path & "" & Sheets("RECAP INDICATORI").Cells(1, 1).Value & "_Risultati indicatori_" & Format(Sheets("RECAP INDICATORI").Cells(1, 10).Value, "ddmmyyyy") & "_" & Format(Sheets("RECAP INDICATORI").Cells(1, 11).Value, "ddmmyyyy")
SaveWithoutMacros (NomeOutput)
Workbooks("INDICATORI ANTIRICICLAGGIO - Risultati.xls").Close savechanges:=False
Questa è la macro che utilizzo.
Non allego anche le funzioni Caricamento Recap e Sportello perchè ho il problema solo in fase di salvataggio e creazione del file "risultati.xls".
Scusa la genericità, non sono troppo tecnico.
Luigi