搜索
写经验 领红包
 > 家居

间隔行怎么设置(如何设置间隔行格式excel)

导语:【实例08-间隔行插入分页符】Excel表格VBA编程实例 代码分享

Private Sub CommandButton处理_Click()

操作界面CCCDC参数不能为空&39;On Error GoTo 处理出错

CCCCD&39;处理表格

With Workbooks(wbname).Worksheets(shname)

Dim i

For i = startnum To stopnum Step splitrow

.HPageBreaks.Add before:=.Cells(i, 1)

Next i

End With

Workbooks(wbname).Save

MsgBox

Workbooks(wbname).Activate

ActiveWindow.WindowState = xlMaximized

Workbooks(wbname).Worksheets(shname).Activate

Workbooks(wbname).Worksheets(shname).Cells(1, 1).Select

Exit Sub

处理出错:

MsgBox Err.Description

End Sub

免责声明:本站部份内容由优秀作者和原创用户编辑投稿,本站仅提供存储服务,不拥有所有权,不承担法律责任。若涉嫌侵权/违法的,请反馈,一经查实立刻删除内容。本文内容由快快网络小碧创作整理编辑!