Sub Get_Scale(Active_Scale) Application.StatusBar = "スケールを取得しています" Set tf = CreateObject("Scripting.FileSystemObject") pth = ThisWorkbook.Path Set tf_txt = tf.OpenTextFile(pth & "\jwc_temp.txt", 1, True) Do Until tf_txt.AtEndOfStream tmp = tf_txt.readline '1行読み込み If Left(tmp, 2) = "hs" Then scale_tmp1 = Split(tmp, " ") If Left(tmp, 2) = "lg" Then scale_tmp2 = Val("&H" & Right(tmp, 1)) + 1 Active_Scale = scale_tmp1(scale_tmp2) Exit Do End If Loop End Sub