zoukankan      html  css  js  c++  java
  • 导出sheet到新文件夹当中

    Sub 导出当前客户达成分析()
    Application.ScreenUpdating = False
    myName1 = Sheets("日期统计表").Range("B1") '客户名称
    myName = Sheets("配送明细报表").Range("BA2")
    mypath = ThisWorkbook.Path
    If Len(Dir(mypath & myName, vbDirectory)) < 1 Then
    MkDir mypath & "" & myName
    End If
    Sheets("日期统计表").Select
    Sheets("日期统计表").Copy
    ActiveSheet.Unprotect Password:=123
    Cells.Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    ActiveSheet.Shapes.Range(Array("Button 1")).Select
    Selection.Delete
    Range("B1:C1").Select
    With Selection.Validation
    .Delete
    .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _
    :=xlBetween
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .IMEMode = xlIMEModeNoControl
    .ShowInput = True
    .ShowError = True
    End With
    ActiveWorkbook.SaveAs Filename:=mypath & "" & myName & "" & myName1 & ".xlsm", FileFormat _
    :=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
    ActiveWindow.Close
    Application.ScreenUpdating = True
    End Sub

  • 相关阅读:
    shell 格式化输出
    Linux tar 修改终端命令
    uniqu 用法
    HashMap按照value值进行排序
    汇编语言系列教程之基础入门 (一)
    Linux权限管理
    linux用户管理
    vim的tab键设定
    HTTP请求(GET与POST区别)和响应
    JS eval()
  • 原文地址:https://www.cnblogs.com/shida-liu/p/9243765.html
Copyright © 2011-2022 走看看