I need a excel marco to close XNote

All discussions here

I need a excel marco to close XNote

Unread postby bluefeather8989 » Mon May 28, 2018 12:28 pm

I need a excel marco to close XNote. I have this one to open and start it. but how to close it?
Code: Select all
 Shell "C:\Program Files (x86)\XNote Stopwatch\xnsw.exe start", vbNormalFocus
bluefeather8989
 
Posts: 7
Joined: Sun Nov 15, 2009 4:38 pm

Re: I need a excel marco to close XNote

Unread postby Stopwatch » Tue May 29, 2018 8:24 am

Currently there is no command to close XNote Stopwatch externally. Howhever if it is really important we could devise something. Is it possible for you to call Win32 API from MS Excel macros?
Stopwatch
Site Admin
 
Posts: 439
Joined: Thu Feb 19, 2009 6:25 pm

Re: I need a excel marco to close XNote

Unread postby bluefeather8989 » Tue May 29, 2018 10:08 pm

..."Is it possible for you to call Win32 API from MS Excel macros?"
that's beyond me.
bluefeather8989
 
Posts: 7
Joined: Sun Nov 15, 2009 4:38 pm

Re: I need a excel marco to close XNote

Unread postby Stopwatch » Wed May 30, 2018 12:42 pm

I'm not familiar with VBA, so here is a pseudocode after googling and guessing:
Code: Select all
Declare Function RegisterWindowMessageA Lib "user32" (ByVal lpString As String) As Long
Declare Function PostMessageA Lib "user32" (ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long

Msg_CloseAll = RegisterWindowMessageA("Close All XNote Stopwatches")
PostMessageA &HFFFF&, Msg_CloseAll, 0, 0
Stopwatch
Site Admin
 
Posts: 439
Joined: Thu Feb 19, 2009 6:25 pm

Re: I need a excel marco to close XNote

Unread postby bluefeather8989 » Wed May 30, 2018 11:23 pm

And where do I put this?? I tried adding this into a modules but it don't work.
bluefeather8989
 
Posts: 7
Joined: Sun Nov 15, 2009 4:38 pm

Re: I need a excel marco to close XNote

Unread postby Stopwatch » Thu May 31, 2018 8:18 am

bluefeather8989 wrote:And where do I put this?? I tried adding this into a modules but it don't work.

that's beyond me.

You should put it somewhere where you want to close running XNote Stopwatch.

Does it generate errors or run smoothly and just does nothing?

Try to seek advice from MS Excel forums. Show them that pseudocode and explain what you want. Any expert should understand an idea and help you with working code. Let me know of results.
Stopwatch
Site Admin
 
Posts: 439
Joined: Thu Feb 19, 2009 6:25 pm


Return to Main forum

Who is online

Users browsing this forum: No registered users and 87 guests

cron