![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Nanaimo, BC
Posts: 49
|
Is there a way to make a message box have a dialogue box in which the user can type a value and then write that value to a cell? Also, how do I make different buttons at the bottom of a dialogue box and change the action they perform when pressed? For example, if I have a dialogue box pop up and display a value contained in a cell and the user decides that value is wrong, can I make another popup box that allows him to change the value? So I would need an "OK" button, a "Change" button, a "Delete" button and a "Cancel" button. Thanks
|
|
|
|
|
|
#2 |
|
Legend
Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,704
|
You could design a user form and develop lots of code to support it, but for your sake, I recommend using XL's built in dialog box in a manner similar to below, seems like you can kill all your birds with one stone.
Code:
Sub DialogueBoxWithField()
n = Application.InputBox(prompt:="Cell A1 has the following Value: " _
& [a1].Value & Chr(13) & Chr(13) & "Please confirm or change the value.", _
Title:="Action Required", Default:=[a1].Value)
If n <> False Then [a1] = n
End Sub
Cheers, Nate [ This Message was edited by: NateO on 2002-05-03 15:33 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|