VBA userForm编辑时中怎样添加drivelistbox,dirlistbox,filelostbox控件

VBA userForm编辑时中怎样添加drivelistbox,dirlistbox,filelostbox控件,第1张

Private Sub Command1_Click()

Dim FSO As New FileSystemObject

FSO.DeleteFolder Dir1.Path

End Sub

'必须先引用Microsoft Scripting Runtime类库

添加工具箱中的drivelistbox,dirlistbox和filelistbox控件,并写以下代码privatenbspsubnbspdrive1_change()nbspnbspnbspdir1.pathnbsp=nbspdrive1.drivenbspnbspnbsp‘nbsp当驱动器改变时,设置目录路径.endnbspsubprivatenbspsubnbspdir1_change()nbspnbspnbspfile1.pathnbsp=nbspdir1.pathnbspnbspnbsp‘nbsp当目录改变时,设置文件路径.endnbspsub


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11357343.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-15
下一篇 2023-05-15

发表评论

登录后才能评论

评论列表(0条)

保存