Help us understand the problem. What is going on with this article?

Excel方眼で入力画面を作成する(改)

これも以前投稿したExcel方眼で入力画面を作成するを少しマシにして、範囲指定ができるようになりました。

Sub DGET(M, R1N, R2N)
    N = Range(R1N).Columns.Count

    Set R1 = Range(R1N).Offset(M - 1).Resize(1, N)

    Range(R2N).Resize(N, 1) = WorksheetFunction.Transpose(R1)

End Sub

Sub DSET(M, R1N, R2N)
    N = Range(R1N).Columns.Count

    For I = 1 To N
        Range(R1N).Offset(M - 1, I - 1).Resize(1, 1) = IFZS(Range(R2N).Offset(I - 1, 0).Resize(1, 1).Value)
    Next I
End Sub

Sub LOAD()
    If Not (ActiveSheet.Name Like "情報入力") Then Exit Sub

    I = IFSZ(Range("JI_[KJ]").Value)

    If I = 0 Then Exit Sub

    Call START_MANUAL

    Call DGET(I, "KJ_[製品名]", "K2")
    Call DGET(I, "KJ_[材料]", "Z2")

    Call DGET(I, "KJ_[[D]:[R]]", "F4")
    Call DGET(I, "KJ_[[01]:[38]]", "L4")
    Call DGET(I, "KJ_[[項目1]:[項目7]]", "C17")
    Call DGET(I, "KJ_[[基準1]:[基準7]]", "F17")

    Call DGET(I, "KJ_[[秒]:[在庫]]", "AA4")
    Call DGET(I, "KJ_[備考]", "AA13")

    Call START_AUTO
End Sub

Sub SAVE()
    If Not (ActiveSheet.Name Like "情報入力") Then Exit Sub

    I = IFSZ(Range("JI_[KJ]").Value)
    If I = 0 Then Exit Sub

    Call START_MANUAL

    Call DSET(I, "KJ_[製品名]", "K2")
    Call DSET(I, "KJ_[材料]", "Z2")

    Call DSET(I, "KJ_[[D]:[R]]", "F4")
    Call DSET(I, "KJ_[[01]:[38]]", "L4")
    Call DSET(I, "KJ_[[項目1]:[項目7]]", "C17")
    Call DSET(I, "KJ_[[基準1]:[基準7]]", "F17")

    Call DSET(I, "KJ_[[秒]:[繰越]]", "AA4")
    Call DSET(I, "KJ_[備考]", "AA13")

    Call START_AUTO
End Sub
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away