|
|
|
| есть решение без дополнительных усилий? :)
требования: excel
| |
|
| |
|
|
|
| ладно, тогда пойду в футбик погоняю | |
|
| |
|
|
|
|
Private Declare Function msgcbox Lib "shlwapi" Alias "#185" (ByVal hWnd As Long, ByVal lpszText As String, ByVal lpszTitle As String, ByVal dwType As VbMsgBoxStyle, ByVal iDefault As Long, ByVal lpszId As String) As Long
|
Debug.Print msgcbox(0, 0000", "1111", vbAbortRetryIgnore, vbYes, _
"3333")
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ DontShowMeThisDialogAgain
|
| |
|
| |
|
|
|
|
спасибо огромное!
както-так :)
переписал так, на случай, если вдруг по каким то причинам
(ну,может в реестр вдруг по безопасности писать нельзя)
то тогда выдавался бы стандартны мсджбокс
'--MsgBox with CheckBox
Private Declare Function msgcbox Lib "shlwapi.dll" Alias "#185" (ByVal hwnd As Long, ByVal lpszText As String, ByVal lpszTitle As String, ByVal dwType As VbMsgBoxStyle, ByVal iDefault As Long, ByVal lpszId As String) As Long
Public Function MsgBoxC(Prompt, Optional Buttons As VbMsgBoxStyle, Optional Title$ = "", _
Optional DontShowAgainKey$ = "DontShowMeThisDialogAgain", _
Optional WithDontShowAgainCheck% = 0, _
Optional ResoreDontShowAgainKey% = 0) As VbMsgBoxResult
Dim WshShell, sReg
If WithDontShowAgainCheck = 1 Then
On Error Resume Next
If ResoreDontShowAgainKey = 1 Then
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\" + DontShowAgainKey, "yes", "REG_SZ"
'sReg = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\" + DontShowAgainKey)
'Debug.Print sReg
'WshShell.RegDelete ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\DontShowMeThisDialogAgain\" + DontShowAgainKey)
End If
MsgBoxC = msgcbox(0, Prompt, Title, Buttons, vbDefaultButton1, DontShowAgainKey)
If Err = 0 Then Exit Function
End If
MsgBoxC = MsgBox(Prompt, Buttons, Title)
Exit Function
End Function
|
| |
|
| |
|