hi to all
When the target folder is missed it gives this problem:
Run-time error 91: Object variable or with blockvariable not set.
I know that it means that the TreeView.DropHighLight = nothing but yet still does not let me exit the sub if nothing is selected, it gives me the error, this is the code:
If tvTreeView.DropHighlight <> "Nothing" Then
Set tvTreeView.DropHighlight = tvTreeView.HitTest(x, Y)
tvTreeView.SelectedItem = tvTreeView.DropHighlight
path3 = tvTreeView.SelectedItem.FullPath & "\"
Else
Exit Sub
End If
if the target is selected it works fine, but if you missed the target the error pops up and it won't let me just exit the sub. How can I handle this so it can allow to exit the sub?
thank you
EP
When the target folder is missed it gives this problem:
Run-time error 91: Object variable or with blockvariable not set.
I know that it means that the TreeView.DropHighLight = nothing but yet still does not let me exit the sub if nothing is selected, it gives me the error, this is the code:
If tvTreeView.DropHighlight <> "Nothing" Then
Set tvTreeView.DropHighlight = tvTreeView.HitTest(x, Y)
tvTreeView.SelectedItem = tvTreeView.DropHighlight
path3 = tvTreeView.SelectedItem.FullPath & "\"
Else
Exit Sub
End If
if the target is selected it works fine, but if you missed the target the error pops up and it won't let me just exit the sub. How can I handle this so it can allow to exit the sub?
thank you
EP