掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
プログラムの組み方について (ID:126783)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
プログラムの組み方について質問です。 案①と案②どちらのほうがよいでしょうか? よろしくお願いいたします。 案① Private Sub H_Up_Click() Timer_Start If (Setting < 5) Then msgbox "aa" End If End Sub Private Sub S_Up_Click() Timer_Start If (Setting < 5) Then msgbox "bb" End If End Sub Private Sub I_Up_Click() Timer_Start If (Setting < 5) Then msgbox "cc" End If End Sub Private Sub Timer_Start() If (Timer1.Enabled = False) Then Timer1.Enabled = True End If End Sub 案② Dim Setting as Textbox Private Sub H_Up_Click() Set Setting = High One_Up End Sub Private Sub S_Up_Click() Set Setting = Speed One_Up End Sub Private Sub I_Up_Click() Set Setting = Interval One_Up End Sub Private Sub One_Up() Timer_Start If (Setting < 5) Then Select Case(Setting) case High msgbox "aa" case Speed msgbox "bb" case Interval msgbox "cc" End Select End If End Sub Private Sub Timer_Start() If (Timer1.Enabled = False) Then Timer1.Enabled = True End If End Sub
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.