| 
    
     |  | ▼ume さん: 
 こんばんは
 
 どのタイミングで転記をしたいのかが不明ですので、
 とりあえずチェックボックスのチェックの判定のところで点kしています。
 
 Dim myMSG As String
 Dim myFlg As Boolean
 Dim x As Long
 Dim r As Long
 Dim c As Long
 Dim z As Long
 Dim i As Long
 
 i = SpinButton1.Value - 1
 myFlg = False
 Sheets("Sheet2").Range("B2:I11").ClearContents
 
 For x = 1 To 35 'チェックボックスの番号
 If Me.Controls("CheckBox" & x).Value = True Then
 myMSG = myMSG & Me.Controls("CheckBox" & x).Caption & vbCrLf
 myFlg = True
 z = z + 1
 r = ((z - 1) \ 4) + 2
 c = (((z - 1) Mod 4) + 1) * 2
 Sheets("Sheet2").Cells(r, c).Value = Sheets("Sheet1").Cells(i, x + 1).Value
 End If
 Next x
 
 If myFlg = True Then
 myMSG = myMSG & "宛てで宜しいですか?"
 If MsgBox(myMSG, vbInformation + vbYesNo) = vbYes Then
 Me.Hide
 ActiveWindow.ActiveSheet.PrintPreview
 Me.Show vbModeless
 End If
 Else
 myMSG = "いずれにもチェックが入っていません"
 MsgBox myMSG
 End If
 
 |  |