deleteRows = true; executeSaveAs = true; key = InputBox("抽出する語句を入力下さい。"); if(key == ""){ return; } for (y = Bottom; y >= 1; y--) { found = false; for (x = 1; x <= Right && !found; x++) { if ([x,y] == key) { found = true; } } if (!found) { if (deleteRows) { DeleteRow(y); } else { SetRowHeight(y, 0); } } } if (executeSaveAs) { SaveAs(); }