Private Sub Image4_Click()
If Right(List2.List(List2.ListIndex), 3) = "doc" Then
FileName = App.Path & "\document\" & List1.List(List1.ListIndex) & "\" & List2.List(List2.ListIndex)
OLE2.SourceDoc = FileName
OLE2.Action = 1
OLE2.Action = 7
End If
End Sub
意思是,我用2个LIST,递进显示文件名称。然后通过上述代码,我想打开选中的文件。结果显示标记无法打开文件。
试过很多方法了,最后发现是List1.List(List1.ListIndex)出错,若用真实名称替换List1.List(List1.ListIndex)则可行。
我试了If List1.List(List1.ListIndex) = “新建文件夹" Then Text2.Text = "相同"
结果不相等。
其余正常,就是这个坎过不去,急急急!在线等!