我在excel中把VBA代码制作成为DLL,但是代码转换成DLL,发现excel并没有完全执行DLL里面的函数
,请问这是怎么回事啊,下面是我的代码PublicSubCashFlow(EAppAsExcel.Application,wbAsExcel.Workbook,shAsEx...
,请问这是怎么回事啊,下面是我的代码
Public Sub CashFlow(EApp As Excel.Application, wb As Excel.Workbook, sh As Excel.Worksheet)
Dim strFileName As String
Dim trimChar As String
Dim urlStr As String
trimChar = 300200
MsgBox (trimChar)
urlStr = "URL;http://quotes.money.163.com/f10/xjllb_" & trimChar & ".html#01c07"
MsgBox (urlStr)
EApp.Sheets("Sheet1").Name = "CashFlow"
EApp.Sheets("CashFlow").Select
EApp.Sheets("CashFlow").Cells.Clear
MsgBox (urlStr)
With EApp.Sheets("CashFlow").QueryTables.Add(Connection:=urlStr, Destination:=Range("A1"))
.Name = urlStr
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingRTF
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
MsgBox (urlStr)
End Sub 展开
Public Sub CashFlow(EApp As Excel.Application, wb As Excel.Workbook, sh As Excel.Worksheet)
Dim strFileName As String
Dim trimChar As String
Dim urlStr As String
trimChar = 300200
MsgBox (trimChar)
urlStr = "URL;http://quotes.money.163.com/f10/xjllb_" & trimChar & ".html#01c07"
MsgBox (urlStr)
EApp.Sheets("Sheet1").Name = "CashFlow"
EApp.Sheets("CashFlow").Select
EApp.Sheets("CashFlow").Cells.Clear
MsgBox (urlStr)
With EApp.Sheets("CashFlow").QueryTables.Add(Connection:=urlStr, Destination:=Range("A1"))
.Name = urlStr
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingRTF
.WebTables = "4"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = True
.Refresh BackgroundQuery:=False
End With
MsgBox (urlStr)
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询