And (Rows(c.Row).Hidden = False)
Sub filter()
Dim one As Integer
Dim c As Variant
one = 0
For Each c In ActiveWorkbook.Worksheets("Лист1").Range("C6:C19")
If (c <> "") And (Rows(c.Row).Hidden = False) Then
one = one + Int(c)
End If
Next
MsgBox (Str(one))
End Sub
Private Sub Check_Click()
Dim cost, quantity, summ, made, total As Double
cost = Val(UserForm1.tCost.Text)
quantity = Val(UserForm1.tQuantity.Text)
made = Val(UserForm1.tMade.Text)
summ = cost * quantity
UserForm1.lSum.Caption = Str(summ)
total = made - summ
UserForm1.lTotal.Caption = Str(total)
End Sub
Sub macros()
Dim i, cell_start, cell_end As Integer
Dim cell_x As Date
i = 1
cell_start = 4 ''' номер ячейки с начальной датой '''
cell_end = 5 ''' номер ячейки с конечной датой '''
cell_x = Cells(21, 4) ''' ячейка с контрольной датой '''
While (Cells(i, cell_start) <> "")
Rows(i).Select
If (Cells(i, cell_start) <= cell_x) And (Cells(i, cell_end) >= cell_x) Then
Selection.EntireRow.Hidden = False
Else
Selection.EntireRow.Hidden = True
End If
i = i + 1
Wend
End Sub
Private Sub MonthView1_DateClick(ByVal DateClicked As Date)
Dim i, col As Integer
i = 1
col = 1 ''' номер ячейки с датами '''
While (Cells(i, col) <> "")
Rows(i).Select
If Cells(i, col) <> DateClicked Then
Selection.EntireRow.Hidden = True
Else
Selection.EntireRow.Hidden = False
End If
i = i + 1
Wend
End Sub