Dialog Box Buttons
I generally use standard Yes/No dialog boxes in my worksheets. I have
a need to have a check box at the bottom so users can choose not to see the dialog box again. I inserted an Excel 5.0 dialog box with a YES & NO buttons and a check box at the bottom. Does anyone know how I capture the button the user presses so I can code the macro to continue or stop? (It is siliar to the task I am trying to accomplish in the code below if that helps with the explanation.) Thanks for any help -Michael Msg = "Compare Cash Value to Balance" & Chr(10) + acct1 Style = vbYesNo Title = " Cash Verification" Response = MsgBox(Msg, Style, Title) If Response = vbYes Then Application.Run macro:="chk_units" Else Sheets("Main").Select Range("b2").Select End If |
Dialog Box Buttons
Didn't you assign a different macro to each button?
If you did, don't you already know which button the user clicked--since you're running that assigned macro? mburkett wrote: I generally use standard Yes/No dialog boxes in my worksheets. I have a need to have a check box at the bottom so users can choose not to see the dialog box again. I inserted an Excel 5.0 dialog box with a YES & NO buttons and a check box at the bottom. Does anyone know how I capture the button the user presses so I can code the macro to continue or stop? (It is siliar to the task I am trying to accomplish in the code below if that helps with the explanation.) Thanks for any help -Michael Msg = "Compare Cash Value to Balance" & Chr(10) + acct1 Style = vbYesNo Title = " Cash Verification" Response = MsgBox(Msg, Style, Title) If Response = vbYes Then Application.Run macro:="chk_units" Else Sheets("Main").Select Range("b2").Select End If -- Dave Peterson |
All times are GMT +1. The time now is 09:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com