Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default HELP! Private Declare Function won't go away

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default HELP! Private Declare Function won't go away

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


Did you quit the search in the dialog, or just close its window?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default HELP! Private Declare Function won't go away

On Wed, 27 May 2015 19:10:35 -0400, GS wrote:

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


Did you quit the search in the dialog, or just close its window?


I honestly don't remember. But I had undocked my computer and brought
it home, and I just fired it up to double check, and all is back to
normal. I may very well have just closed it. Not sure why undocking
my computer would make a difference. Anyway, all is well. Thank you
for taking the time to follow up with me.

Frank
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,182
Default HELP! Private Declare Function won't go away

I honestly don't remember. But I had undocked my computer and
brought
it home, and I just fired it up to double check, and all is back to
normal. I may very well have just closed it. Not sure why undocking
my computer would make a difference. Anyway, all is well. Thank you
for taking the time to follow up with me.


Very interesting! Thanks for the feedback...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default HELP! Private Declare Function won't go away

Hi again. Just wanted to follow up again with the latest. When I went
back into work today and redocked my computer and booted it up, the
issue was back. Very frustrating. But, I had to RESTART my computer
this afternoon for an IT update, and after that, all was back to
normal. So weird. Phantom code. Just thought I'd let you know.
Thanks again!

Frank

On Thu, 28 May 2015 13:58:10 -0400, GS wrote:

I honestly don't remember. But I had undocked my computer and
brought
it home, and I just fired it up to double check, and all is back to
normal. I may very well have just closed it. Not sure why undocking
my computer would make a difference. Anyway, all is well. Thank you
for taking the time to follow up with me.


Very interesting! Thanks for the feedback...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Improve method of calling a private function in a private module XP Excel Programming 1 April 30th 08 06:41 PM
Private Declare Function David A. Excel Programming 6 July 31st 07 06:38 PM
Lib parameter in Function Declare ojv[_2_] Excel Programming 4 June 12th 07 07:40 AM
Declare and array in a function Dave Excel Programming 3 September 30th 06 03:41 AM
How do I declare a function whose output is an array? Schizoid Man[_2_] Excel Programming 5 May 24th 06 09:23 PM


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"