Documente Academic
Documente Profesional
Documente Cultură
Dim i As Integer
Dim a As Integer
'verifica daca sa apasat yes(6) se arata culorile, daca sa apasat no se ascund culorile
If a = 6 Then
For i = 1 To 30
Next
Else
For i = 1 To 30
Next
End If
End Sub
Is Nothing Then
Worksheets("Sheet1").Range(Target.Address).Interior.ColorIndex = 3 'rosu
Else
Worksheets("Sheet1").Range(Target.Address).Interior.ColorIndex = 4 'verde
End If
End If
End Sub
End Sub
C) Dupa editarea unei cellule in zona urmarita se activeaza butonul si se sterg formatarile de
culoare. Se modifica fundalul numai in functie de continutul celulelor dupa actionarea butonului
de validare:
For i = 1 To 30
Else
'daca celula contine valori numerice mai mari sau egale cu 5 se schimba fundalul in verde
Else
'daca celula contine valori numerice mai mici decat 5 se schimba fundalul in rosu
End If
End If
Next
Sheets("Sheet1").btnCheckVal.Visible = False
End Sub
Sheets("Sheet1").btnCheckVal.Visible = False
Dim i As Integer
For i = 1 To 30
Worksheets("Sheet1").Range("A" & i).Interior.ColorIndex = 0 'alb
Next
Is Nothing Then
Sheets("Sheet1").btnCheckVal.Visible = True
End If
End Sub
Sub BlinkMsg()
'seteaza vizibilitatea butoanelor
Sheets("Sheet1").btnShow.Visible = True
Sheets("Sheet1").btnClear.Visible = False
End Sub
'uneste celulele
Worksheets("Sheet1").Range("J10:S20").Merge
m_blnLooping = True
Do While m_blnLooping
If Worksheets("Sheet1").Range("J10").Interior.ColorIndex = 2 Then
Worksheets("Sheet1").Range("J10").Interior.ColorIndex = 3
Else
Worksheets("Sheet1").Range("J10").Interior.ColorIndex = 2
End If
Workbooks.Open Filename:="C:\Users\bechefl001\Desktop\aiurea.xlsx"
Application.DisplayAlerts = False
Sheets("Sheet1").Delete
Application.DisplayAlerts = True
Windows("test.xlsm").Activate
Worksheets("Sheet1").Range("D1:H11").Copy
Windows("aiurea.xlsx").Activate
Worksheets("fff").Range("a1").PasteSpecial xlPasteValues
Worksheets("fff").Range("a1").PasteSpecial Paste:=xlPasteFormats
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
Afiseaza culorile:
Sub Culori()
Cells.Clear
Dim x As Long
Dim y As Long
Dim z As Long
Dim swrow As Long
Dim swcol As Long
swrow = 1
swcol = 1
For x = 0 To 250
For y = 0 To 250
For z = 0 To 250
Else
swrow = 1
swcol = swcol + 2
End If
Columns(swcol).AutoFit
Columns(swcol + 1).ColumnWidth = 2
DoEvents
z = z + 9
Next z
y = y + 9
Next y
x = x + 9
Next x
End Sub