Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default how disable macro that uses FnSetForegroundWindow

Thanks in advance for any help.
I have a macro that controls another application by using the function
FnSetForegroundWindow and also FnFindWindowLike, and then sending keys to it.
It seems I have a very hard time canceling my macro. I think it has something
to do with these functions I mentioned. I have a:
On Error GoTo handleCancel
Application.EnableCancelKey = xlErrorHandler
and a section for that:
handleCancel:
If Err = 18 Then
MsgBox "You cancelled"
End If
But this doesn't help. Does anyone have an idea on how I can stop my program
easily? It is a little long (30 seconds-1 minute) and I don't want the user
frustrated. And it might mess up there program if they can't stop it.
thanks again
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
Disable Esc-key - macro yshridhar Excel Discussion (Misc queries) 4 February 9th 08 04:19 AM
How to disable the Macro? Eric Excel Discussion (Misc queries) 1 November 10th 07 04:25 PM
Disable macro at runtime Sandy Excel Worksheet Functions 2 May 12th 07 11:56 AM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
enable/disable macro RICK Excel Discussion (Misc queries) 4 June 15th 06 07:55 PM


All times are GMT +1. The time now is 12:19 AM.

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

About Us

"It's about Microsoft Excel"