|
Option Explicit
Private Sub cmd인쇄_Click()
Dim prWs As Worksheet
Dim crWs As Worksheet
Dim i As Integer
Set prWs = Sheets("인쇄")
Set crWs = Sheets("인쇄필터조건")
Application.ScreenUpdating = False
crWs.Range("A2:T2").ClearContents
crWs.Cells(2, Me.lst종목.ListIndex + 1) = "●"
prWs.Rows("6:100").Clear
prWs.Range("B3") = Me.lst종목
Sheets("고객목록").Range("A1").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=crWs.Range("A1:T2"), CopyToRange:=prWs.Range("B5:T5")
For i = 6 To prWs.Range("A5").CurrentRegion.Rows.Count + 4
prWs.Cells(i, 1) = "=Row()-5"
Next
With prWs.Range("A5").CurrentRegion
.Borders(xlEdgeLeft).LineStyle = xlContinuous
.Borders(xlEdgeRight).LineStyle = xlContinuous
.Borders(xlEdgeTop).LineStyle = xlContinuous
.Borders(xlEdgeBottom).LineStyle = xlContinuous
.Borders(xlInsideVertical).LineStyle = xlContinuous
.Borders(xlInsideHorizontal).LineStyle = xlContinuous
End With
Unload Me
prWs.Select
Application.ScreenUpdating = True
End Sub
Private Sub cmd취소_Click()
Unload Me
End Sub
Private Sub lst종목_Click()
Dim i As Integer
i = WorksheetFunction.CountA(Sheets("고객목록").Columns(21 + Me.lst종목.ListIndex)) - 1
Me.lbl인원수.Caption = Me.lst종목 & "의 등록인원은 총 " & i & "명입니다."
End Sub
Private Sub UserForm_Initialize()
With Me.lst종목
.AddItem "헬스"
.AddItem "골프"
.AddItem "요가"
.AddItem "수영"
End With
End Sub
>>
위 부분외에 수정 할 곳이 있나요 |
|