|
▼Statis さん:
>こんにちは
>すべて同じモジュールです。。。。
>
>
>'==========以下UserFormモジュール===============
>Private Sub ComboBox1_Change()
>Dim Co As Long
>Select Case Me.ComboBox1
> Case "一 郎": Co = 3
> Case "二 朗": Co = 46
> Case "三 朗": Co = 89
> Case "四 朗": Co = 132
> Case Else: Exit Sub
>End Select
>Call 入力(Me.ComboBox1.Value, Co)
>End Sub
>
>
>Private Sub 入力(Ws As String, Co1 As Long)
> Dim Cou As Long, i As Long
> With Worksheets(Ws)
> For i = 2 To 43
> Select Case i
> Case 2 To 8: Cou = 11
> Case 9 To 15: Cou = 13
> Case 16 To 22: Cou = 15
> Case 23 To 29: Cou = 17
> Case 30 To 36: Cou = 19
> Case 37 To 43: Cou = 21
> End Select
> .Cells(Cou, i).Value = Me.Controls("TextBox" & i + Co1).Value
> .Cells(Cou - 1, i).Value = Me.Controls("label" & i + 41).Caption
> Next i
> End With
>End Sub
>
>'========までUserFormのモジュール===========
入力の所はシート名に直して実行しました。
Me キーワド使用方法が不正です と エラーになります。
|
|