Sub cnv_html() fileSaveName = Application.GetSaveAsFilename("*.htm", "HTMLファイル (*.HTM), *.HTM", , "出力ファイル指定", "了解") ' If fileSaveName <> False Then ' MsgBox fileSaveName & "でセーブします。" ' End If Call Output(fileSaveName) End Sub Sub Output(filename) Dim xx, yy '選択範囲取得 'sheetname = Application.PreviousSelections(1).Select.Name sheetname = ActiveSheet.Name 'sheetname = "Sheet1" x0 = Selection.Columns(1).column y0 = Selection.Rows(1).row xx = Selection.Columns.Count yy = Selection.Rows.Count '出力ファイルオープン Open filename For Output As #1 ' Print #1, "
" ' Print #1, "" Print #1, ""; a$; " | "; Next x Print #1, "