应该是
用fso 或者用open xmlfile.xml as #1 都行。
用fso 或者用open xmlfile.xml as #1 都行。
解决方案 »
- 有没有VB编写的修改HOSTS文件的小木马?
- 请问有没有介绍用VBA进行Powerpoint相关开发的书籍或资料啊?
- 求两个排序!
- vb导入到EXCEL的数据,如何让EXCEL中的单元格根据数据的长短自动调整单元格的长度!
- 如何向工具栏按钮发送单击消息?
- vb操作两个access的问题(高分请教,高手解决,解决立即给分了---好久没发问了)
- 小弟新弄了个网站www.madio.net,希望各位大侠多多指教!
- 怎么能像flashget一样,在点击网页的时候,可以在右键菜单有“使用网际快车下载“这样的按钮
- 增量备份,超难度,看看也行。
- 求用文本文件建立ADO的记录集对象的实例
- 如何缩短控件的toolsTiptext 显示延时?赐教
- 问一个计算工作日的问题?
Public XMLRst As ADODB.RecordsetDim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set XMLRst = New ADODB.Recordset
If fso.FileExists(mstrFile) Then
XMLRst .Open mstrFile
Else
XMLRst .Fields.Append "Remote Server", adVarChar, 128
XMLRst .Fields.Append "Remote UID", adVarChar, 128
XMLRst .Fields.Append "Remote PWD", adVarChar, 128
XMLRst .Fields.Append "Remote Path", adVarChar, 128
XMLRst .Fields.Append "Remote File", adVarChar, 128
XMLRst .Fields.Append "Local Path", adVarChar, 128
XMLRst .Fields.Append "Local File", adVarChar, 128
XMLRst .Fields.Append "FileSize", adDouble
XMLRst .Open
XMLRst .Save mstrFile, adPersistXML
End If
.AddNew
.Fields("Remote Server") = CStr(Label1(0).Caption)
.Fields("Remote UID") = CStr(Label1(1).Caption)
.Fields("Remote PWD") = CStr(Label1(2).Caption)
.Fields("Remote Path") = CStr(Label1(3).Caption)
.Fields("Remote File") = CStr(Label1(4).Caption)
.Fields("Local Path") = CStr(Label1(5).Caption)
.Fields("Local File") = CStr(Label1(6).Caption)
.Fields("FileSize") = CDbl(Label1(7).Caption)
.Update
.Save , adPersistXML
End With