zoukankan      html  css  js  c++  java
  • VBA读取文件

    Dim Foldar As String
    Private Sub btn(ByVal Target As Range)
        If Target.Row = 1 And Target.Column = 1 Then
         Search
        End If
    End Sub

    Sub Search()
        With Application.FileDialog(msoFileDialogFolderPicker)
            If .Show = True Then
                Foldar = .SelectedItems(1)
                'Range("D3").Value = Foldar
                selectjs (Foldar)
            End If
        End With
    End Sub

    Public Function selectjs(ByVal lujing As String)

        Dim MyFile As String

        Dim s As String     

       Dim i As Integer    

    MyFile = Dir(lujing & "" & "*.js")    

    count = count + 1    

    s = MyFile   

      output (s)     Do While MyFile <> ""      

       MyFile = Dir                

    If MyFile = "" Then        

    count = 0             Exit Do

            End If      

               count = count + 1     

            s = MyFile      

       output (s)    

    Loop    

    Debug.Print s

    End Function

    Public Function output(sname)

    Range("A" & count).Value = sname

    End Function

  • 相关阅读:
    自己上手写性能测试工具(一)
    你的领导真的很傻X吗?
    微软自动化测试工具palywright
    虫师『性能测试』文章大汇总
    虫师『软件测试』基础 与 测试杂谈
    「UI 测试自动化selenium」汇总
    web测试02
    web测试01
    测试20
    测试19
  • 原文地址:https://www.cnblogs.com/dzh1990/p/4539070.html
Copyright © 2011-2022 走看看