掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
error 9 : subscript out of range を出ないようにするには? (ID:80288)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
はじめまして、VB初心者です。 error 9 : subscript out of range が**のラインで出てしまいます。 どうしてなのかさっぱり分かりません。ご回答よろしくお願いします。 Private Sub GAP_Next_Button_Click() Dim BreakPoint() As Boolean Dim OktoGo As Boolean Dim a, b, c As String a = GAP_A_1_Textbox.Value b = GAP_A_2_Textbox.Value c = GAP_A_3_Textbox.Value If Not BreakPoint(a, b, c) Then**下記のFunctionがおかしいのでしょうか? OktoGo = False MsgBox "false" End If GAP_Form.Hide Weights_Scores_Form.Show End If End Sub Private Function BreakPoint(a As String, b As String, c As String) If Not IsNumeric(a) Or Not IsNumeric(b) Or Not IsNumeric(c) Then MsgBox "Enter numeric. Please, try again.", vbExclamation + vbOKOnly, "Input Error" BreakPoint = False Exit Function If a <= 0 Then MsgBox "Break Point One has to be smaller than BP2, BP3 and 1. Please, try again.", vbExclamation + vbOKOnly, "Input Error" BreakPoint = False Exit Function End If If b <= a Then MsgBox "Break Point One has to be smaller than BP2, BP3 and 1. Please, try again.", vbExclamation + vbOKOnly, "Input Error" BreakPoint = False Exit Function End If If 1 <= c Then MsgBox "Break Point One has to be smaller than BP2, BP3 and 1. Please, try again.", vbExclamation + vbOKOnly, "Input Error" BreakPoint = False Exit Function End If If a = "" Or b = "" Or c = "" Then MsgBox "Enter numeric. Please, try again.", vbExclamation + vbOKOnly, "Input Error" BreakPoint = False Exit Function End If End Function
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.