Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I had been looking at a way to pass a number from my Excel sheet to the search function in Windows Explorer to find documents with that number in a specific folder. After a bit of searching, I found the code below that does load a Search (Find) dialogue box, but it wasn't initially quite what I had in mind. So I removed it from the module, including Option Explicit and everything below, and I then even removed the module it was in, but the function is still there. I've looked all over for it, and I can't find it, but it won't go away. When I open an Excel workbook, I used to be able to click Alt+F11 to open VBA, but I can't now. Worse, whenever I try to step through another module, the Search/Find dialogue box opens. I've shut down my workbook, restarted my computer, and it comes back with every workbook. How do I get rid of this? I'm stuck until I do. I would GREATLY appreciate any advice! Thanks!! Option Explicit 'API declaration for the windows "Search Results" dialog 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 Sub ShowWindowsSearchDialog_API() ' Specified drive to Search Const szSDrive As String = "C:\" ShellSearch 0, "find", szSDrive, "", "", SW_SHOWNORMAL End Sub Frank |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Improve method of calling a private function in a private module | Excel Programming | |||
Private Declare Function | Excel Programming | |||
Lib parameter in Function Declare | Excel Programming | |||
Declare and array in a function | Excel Programming | |||
How do I declare a function whose output is an array? | Excel Programming |