|
早い回答ありがとうございます。
>ユーザーフォームでなくExcel 5.0 ダイアログのことでしょうか?
そうです。
Excel 5.0 ダイアログを使用しています。
>この情報からだと状況が把握できませんので、
>コードを掲載して頂けないでしょうか?
こんな感じです。
汚いソースですいません・・・。
Do
l_cnt = l_cnt + 1
If Worksheets(w_sname).Cells(l_cnt, 2) = "" Then
check = True
End If
If check = False Then
If p_cnt >= 5 Then
' ActiveSheet.PrintOut
ActiveSheet.PrintPreview
Range("A1:W60").Select
Selection.ClearContents
page = page + 1
p_cnt = 0
End If
p_cnt = p_cnt + 1
If p_cnt = 1 Then
Worksheets("print").Cells(2, 8) = Mid(wk_from, 1, 2)
Worksheets("print").Cells(2, 10) = Mid(wk_from, 3, 2)
Worksheets("print").Cells(2, 12) = Mid(wk_from, 5, 2)
Worksheets("print").Cells(3, 8) = Mid(wk_to, 1, 2)
Worksheets("print").Cells(3, 10) = Mid(wk_to, 3, 2)
Worksheets("print").Cells(3, 12) = Mid(wk_to, 5, 2)
Worksheets("print").Cells(2, 15) = wk_hojin1
Worksheets("print").Cells(3, 15) = wk_hojin2
End If
Worksheets("print").Cells(5, 4 * p_cnt - 2) = Worksheets(w_sname).Cells(l_cnt, 2)
Worksheets("print").Cells(7, 4 * p_cnt - 2) = Worksheets(w_sname).Cells(l_cnt, 3)
Worksheets("print").Cells(9, 4 * p_cnt - 1) = Worksheets(w_sname).Cells(l_cnt, 4)
Worksheets("print").Cells(9, 4 * p_cnt) = Worksheets(w_sname).Cells(l_cnt, 5)
Worksheets("print").Cells(9, 4 * p_cnt + 1) = Worksheets(w_sname).Cells(l_cnt, 6)
Worksheets("print").Cells(11, 4 * p_cnt - 1) = Worksheets(w_sname).Cells(l_cnt, 7)
Worksheets("print").Cells(11, 4 * p_cnt) = Worksheets(w_sname).Cells(l_cnt, 8)
Worksheets("print").Cells(11, 4 * p_cnt + 1) = Worksheets(w_sname).Cells(l_cnt, 9)
Worksheets("print").Cells(13, 4 * p_cnt - 2) = Worksheets(w_sname).Cells(l_cnt, 10)
Worksheets("print").Cells(15, 4 * p_cnt - 2) = Worksheets(w_sname).Cells(l_cnt, 11)
Worksheets("print").Cells(17, 4 * p_cnt - 2) = Worksheets(w_sname).Cells(l_cnt, 12)
End If
Loop Until check = True
|
|