掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
タブロードにおける、最適なコード (ID:100837)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
タブインデックスすに、テキストBOXを多数ロードしたいです。 タブごとに、テキストボックスのコントロール名が違います。 タブが5個あると、下記のコードだと長くなりますが、 まとめる事はできますか? SSTab1.Tab = 3 intIndex = 0 For k = 0 To 9 For i = 0 To 3 If intIndex <> 0 Then Call Load(txtWrong4(intIndex)) End If With txtWrong4(intIndex) .Visible = True If i = 0 Then .Left = txtWrong4(i).Left Else .Left = txtWrong4(i - 1).Left + txtWrong4(i - 1).Width End If .Top = txtWrong4(0).Top + txtWrong4(0).Height * k End With intIndex = intIndex + 1 Next i Next k SSTab1.Tab = 4 intIndex = 0 For k = 0 To 9 For i = 0 To 3 If intIndex <> 0 Then Call Load(txtWrong5(intIndex)) End If With txtWrong5(intIndex) .Visible = True If i = 0 Then .Left = txtWrong5(i).Left Else .Left = txtWrong5(i - 1).Left + txtWrong5(i - 1).Width End If .Top = txtWrong5(0).Top + txtWrong5(0).Height * k End With intIndex = intIndex + 1 Next i Next k
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.