Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JJ JJ is offline
external usenet poster
 
Posts: 122
Default Input values directly in message box?

Is there a way to have a message box come up that allows the user to input a
value directly into the message box, which stores that value in a seperate
cell. I have a drop down box, and when the user picks "Other", I want them to
be able to input their own value, except, I don't want it to remain in the
drop down box.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Input values directly in message box?

You have two options...one you could create a user form which would
have a pop up window where they could put in a number..or you could
what I did once, which was when they choose other a cell next to the
drop down window, changes color, gets the focus, and the number can be
put in there, here is vba code to do that.

Sub Freeform()


If Range("E53").Value = 0 Then

Range("I24").Select
Selection.Font.ColorIndex = 0

Range("C21").Select
Selection.Font.ColorIndex = 0
Selection.Interior.ColorIndex = 34
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
..LineStyle = xlContinuous
..Weight = xlMedium
..ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
..LineStyle = xlContinuous
..Weight = xlMedium
..ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
..LineStyle = xlContinuous
..Weight = xlMedium
..ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
..LineStyle = xlContinuous
..Weight = xlMedium
..ColorIndex = xlAutomatic
End With

Range("C21").Select

''''''''''''''''''

Else

Range("C21").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
With Selection.Font
..ColorIndex = 33
End With
With Selection.Interior
..ColorIndex = 33
End With

Range("I24").Select
With Selection.Font
..ColorIndex = 33
End With

Range("A21").Select

End If
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Input values directly in message box?

JJ,

Take a look at Inputbox in the VBA help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JJ" wrote in message
...
Is there a way to have a message box come up that allows the user to input

a
value directly into the message box, which stores that value in a seperate
cell. I have a drop down box, and when the user picks "Other", I want them

to
be able to input their own value, except, I don't want it to remain in the
drop down box.



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
How do you move the input message? dunnL1 Excel Discussion (Misc queries) 4 March 6th 08 07:34 PM
Message or input thesaxonuk Excel Discussion (Misc queries) 4 October 25th 06 09:38 AM
Help - Can't directly input Japanese characters into cell NKK Excel Discussion (Misc queries) 0 January 3rd 06 02:00 AM
Can VBA accept input from a message box? dougmcc1[_7_] Excel Programming 1 October 7th 04 10:48 PM
input message tamersaid Excel Programming 1 June 6th 04 02:06 PM


All times are GMT +1. The time now is 09:44 PM.

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"