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

  • 相关阅读:
    数组类的创建——DynamicArray.h
    顺序存储线性表的分析
    数组类的创建——StaticArray.h
    DynamicList
    StaticList
    顺序存储结构的抽象实现
    线性表的顺序存储结构
    29.无线接入网容量规划
    28.核心网容量规划
    27.IP承载网容量仿真
  • 原文地址:https://www.cnblogs.com/dzh1990/p/4539070.html
Copyright © 2011-2022 走看看