Sub Get_ch_size(no, cw, ch, cd)''文字種2を取得する場合は'Call Get_ch_size(2, hcw, hch, hcd)'Set tf = CreateObject("Scripting.FileSystemObject")pth = ThisWorkbook.PathSet tf_txt = tf.OpenTextFile(pth & "\jwc_temp.txt", 1, True)Do Until tf_txt.AtEndOfStream tmp = tf_txt.readline '1行読み込み If Left(tmp, 3) = "hcw" Then cw_tmp = Split(tmp) cw = Val(cw_tmp(no)) tmp = tf_txt.readline ch_tmp = Split(tmp) ch = Val(ch_tmp(no)) tmp = tf_txt.readline cd_tmp = Split(tmp) cd = Val(cd_tmp(no)) Exit Do End IfLoopEnd Sub