请高手们来谈谈如何不使用DATAPOOL而调用外部文件的数据,请我们初学者也长长知识^_^
:lol如题!!!!调用Excel文件的数据
调用Excel文件的数据.论坛中有很多相关的例子,你可以去搜索看下.. 从论坛上找的,可以参看一下on error resume next
Set excel = GetObject(,"excel.application")
if(excel Is Nothing) then
Set excel = CreateObject("excel.application")
if(excel Is Nothing) then
MsgBox "Couldn't find Excel!"
Exit Sub
End if
End if
Set book = excel.Workbooks.Open("Your Book1.xls")
Set worksheet = book.Worksheets("Your Excel sheet's name")
For count=1 To 2
name = worksheet.Cells(1,count).Value
pass = worksheet.Cells(2,count).Value
Next count
'Quit Excel'''''''''''''''''''''
excel.Quit
Set excel = Nothing 谢谢了^_^
页:
[1]