Option Explicit' 全选
Private Sub Command1_Click()
Dim i As Long
For i = 0 To Me.File1.ListCount - 1
Me.File1.Selected(i) = True
Next
End Sub' 得到选中的文件名(多选)
Private Sub Command2_Click()
Dim i As Long
Dim strFiles As String
For i = 0 To Me.File1.ListCount - 1
If Me.File1.Selected(i) Then
strFiles = strFiles & Me.File1.List(i) & vbCrLf
End If
Next
MsgBox strFiles
End Sub
Private Sub Command1_Click()
Dim i As Long
For i = 0 To Me.File1.ListCount - 1
Me.File1.Selected(i) = True
Next
End Sub' 得到选中的文件名(多选)
Private Sub Command2_Click()
Dim i As Long
Dim strFiles As String
For i = 0 To Me.File1.ListCount - 1
If Me.File1.Selected(i) Then
strFiles = strFiles & Me.File1.List(i) & vbCrLf
End If
Next
MsgBox strFiles
End Sub
解决方案 »
- 如何判断一个应用程序已经完全启动
- 请教VB DoEvents 语句的API升级版
- vb flexgrid 怎样显示数据库信息
- 系统托盘中的图标不见了,如何恢复?(非vb问题)
- 各位高手,帮帮忙哈!
- 谁能给个加密和解密的模块啊????
- 怎么把一个Winsock放入到一个类中?
- VBA,Word中如何将列与列内容调换
- fso对象的opentextfile方法,如果读到文本末尾,怎么又返回到文本头?
- 帮帮忙,找出10000以内的素数
- 如何将一长整数形态的IP地址变为带点的十进制IP地址?
- 我越来越对的前除感到渺茫!看了好久关于专业程序的书(其中有《程序员》和《电脑编程技巧与维护》)里面介绍VB的文章很好,好像大家都不太重视他!!VB7 什么样,我还没用过,有人用过了吗?说来听听!!
for i=0 to file1.listcount-1
Debug.Print file1.list(i)
next
总出错
for i=0 to file1.listcount-1
Debug.Print File1.ListIndex(i)
next
总出错