-
Nov 8th, 2018, 05:34 PM
#1
Thread Starter
Frenzied Member
Explore and Search
Code:
Private Sub Command1_Click()
ExploreIt ("H:\Shared")
End Sub
Sub ExploreIt(p)
Call Shell("Explorer.exe /select," & p, vbNormalFocus)
End
End Sub
Private Sub Command2_Click()
ExploreIt ("N:\Data4")
End Sub
I'm using the above code to explore to certain folders.
It is possible to add something so the Folder Opens showing the Windows Search Dialog ?
-
Nov 8th, 2018, 07:15 PM
#2
Re: Explore and Search
Search dialog? What ancient Windows version are you using?
-
Nov 8th, 2018, 07:28 PM
#3
Thread Starter
Frenzied Member
Re: Explore and Search
Windows XP and you don't have to be insulting !
-
Nov 9th, 2018, 08:11 AM
#4
Re: Explore and Search
It's cool. I've only recently moved everything I own to win10, and gave up my XP sandbox. XP was just too limiting for development purposes.
You should be able to find an old Windows 7/8 license to use to upgrade to Win10. MS is still allowing you to register Win10 with these old licenses with clean installs.
There's pretty much no excuse not to be on win10. Some companies move slow though... even with events like WannaCry.
Last edited by DEXWERX; Nov 9th, 2018 at 08:15 AM.
-
Nov 9th, 2018, 07:05 PM
#5
Thread Starter
Frenzied Member
Re: Explore and Search
I have a win 10 machine as well as XP. Much prefer XP though. Lots of reasons, not the least being all the apps that in use.
-
Nov 9th, 2018, 09:48 PM
#6
Addicted Member
Re: Explore and Search
Hi,
The following code will open search results interface in XP with the focus on the specific path. Perhaps, it may help you in whatever manner.
Code:
Option Explicit
Private Declare Function ShellSearch& Lib "shell32.dll" _
Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long)
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
SearchIt("H:\Shared\")
End Sub
Private Sub Command2_Click()
SearchIt("N:\Data4\")
End Sub
Sub SearchIt(path as string)
ShellSearch 0, "Find", path, "", "", SW_SHOWNORMAL
End Sub
You can also check other command line switches of Explorer in XP.
https://ss64.com/nt/explorer.html
-
Nov 10th, 2018, 02:39 AM
#7
Thread Starter
Frenzied Member
Re: Explore and Search
Great stuff PGB, I spent many hours trying to sort this. Your routine does it perfectly, many thanks.
I've a big job on and this will speed it up enormously.
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|