Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shut Down PC


Hi there

Is there a vba code to shut Down PC ? :(

Thank u


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=507743

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shut Down PC


Hello Hesham,

Here is an API routine that calls the shutdown dialog.

Public Declare Function SHShutDownDialog _
Lib "shell32.dll" _
Alias "#60" _
(ByVal Display As Long) As Long


To invoke the Shutdown Dialog:

RetVal = SHShutDownDialog(0&)

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=507743

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shut Down PC


Thank u v much :)

How can make the shutDown triggered by the code it self without the
user interferance...........?


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=507743

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Shut Down PC


Private Sub UserForm_Initialize()
call Shtdown
end sub


????


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=507743

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
Shut off / disable a constant? dave@aeronautics Excel Discussion (Misc queries) 2 December 29th 09 05:00 PM
Shut off web links? Bob Newman Excel Discussion (Misc queries) 2 September 6th 09 04:22 AM
Ignoring code to shut a workbook if it is already shut Cammy Excel Discussion (Misc queries) 1 September 12th 06 06:12 PM
GETPIVOTDATA -- How do I shut it OFF! besbaum Excel Worksheet Functions 1 July 13th 05 09:23 PM
Shut down excel Greg B Excel Discussion (Misc queries) 1 April 26th 05 07:05 AM


All times are GMT +1. The time now is 05:49 AM.

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"