Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

1 Eylül 2009 Salı

WinExit DialogBox on XP & Close The Windows OS


'Module1

Option Explicit
Declare Function ExitWindowsEx& Lib "User32" (ByVal uFlags&, ByVal wReserved&)
Global Const EWX_FORCE = 8
Global Const EWX_LOGOFF = 0
Global Const EWX_REBOOT = 2
Global Const EWX_SHUTDOWN = 1
Dim Komut
Sub WindowsuKapat() 'Close The Windows OS

On Error Resume Next
Komut = ExitWindowsEx(EWX_SHUTDOWN, 0&)

End Sub
Sub WindosuKaptmaEkranı() 'WinExit DialogBox on XP

On Error Resume Next
VBA.CreateObject("Shell.Application").ShutdownWindows

End Sub

Hiç yorum yok:

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul