文件另存为_导出为xls和xlsx格式可任选

时间:2015-12-06 11:06:23
【文件属性】:

文件名称:文件另存为_导出为xls和xlsx格式可任选

文件大小:7KB

文件格式:RAR

更新时间:2015-12-06 11:06:23

VBA 读 XML

'------------------------------------- '窗口环境初始化设置 '------------------------------------- Private Sub Workbook_Open() Rem 加快计算速度 Call Mod_Environment Rem 打开窗口默认最大化显示 Application.WindowState = xlMaximized Sheets("Config Data").Activate Rem 解保护 ActiveSheet.Unprotect Password:="huawei" Rem 设置列宽 Sheets("Config Data").Columns("J:BB").Select Selection.ColumnWidth = 15 Rem 单元格取消保护 Rows("10:65535").Select Selection.Locked = False Selection.NumberFormatLocal = "@" Rows("9").Select Selection.NumberFormatLocal = "G/通用格式" Rem 窗口冻结 workbookname = ThisWorkbook.Name FileType = Right(workbookname, Len(workbookname) - InStrRev(workbookname, ".")) Select Case FileType Case "xlsm" ActiveWindow.SplitRow = 9 Case "xls" ActiveWindow.SplitRow = 3 End Select ActiveWindow.FreezePanes = True Rem 保护 ActiveSheet.Protect Password:="huawei", Contents:=True, Scenarios:=True Rem 默认窗口位置 Range("B4").Select ActiveWindow.ScrollRow = 1 ActiveWindow.ScrollColumn = 1 Sheets("Config Data").ScrollArea = "A1:BB65535" Rem 恢复Excel环境 Call Rec_Environment End Sub


【文件预览】:
服务交流
----2.xml(12KB)
----Common.bas(3KB)
----Import_reality_configuration.bas(5KB)
----Export_Excel.bas(5KB)
----ThisWorkbook.txt(1KB)
----1.xml(8KB)

网友评论