Input Prompts

DGB

Board Regular
Joined
Oct 17, 2007
Messages
134
Hi,

I have a situation which requires a pop up window that will prompt the user for 2 pieces of information.

Ideal Situation:

When a user selects a cell (A4), I would like a window to pop up that asks the user:
Number of Forms: X
Number of Languages: Y

Where X and Y are the answers provide by the user.
Then I would like Excel to multipoly the 2 responses and have the product as the value entered in the cell. This value will then be used in another formula.

Is such a thing possible?

Thanks in advance for your help
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hello,

this ocde needs to go into the relevant sheet code window

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$A$4" Then
        MY_X = InputBox("Number of forms", "DATA ENTRY")
        MY_Y = InputBox("Number of Languages", "DATA ENTRY")
        Target.Value = MY_X * MY_Y
    End If
End Sub
 
Upvote 0
HI
SOMETHING ALONG THE FOLLOWING LINES MIGHT HELP:
Dim lngRp1 As Long

Dim lngrp2 As Long

lngRp1 = Application.InputBox(Prompt:="Enter data1", Type:=1)
lngrp2 = Application.InputBox(Prompt:="Enter data2", Type:=1)

Range("a1") = lngRp1 * lngrp2

REGARDS
Wolfshead
 
Upvote 0
Thank you Drafter.

I am a newbe so when you say to "put this into the relevent sheet code window"

How is that done?
 
Upvote 0
Hello,

In Excel, place mouse over the sheet tab i.e. Sheet1, right click the mouse, and select VIEW CODE. Place the code here.
 
Upvote 0
Hi,

I did as you suggested and changed the cell address to D14 (as that is the actual cell on which I would like the popup) but when I then select d14 on that sheet, I get no popup.

Did I do something wrong?
 
Upvote 0
Wolfshead,

Thank you for your suggestion,

I added your code to the code windo for the relevent sheet but again when I highlight the cell, I get no pop up.

Any suggestion as to what I may be doing wrong?
 
Upvote 0

Forum statistics

Threads
1,203,558
Messages
6,056,078
Members
444,844
Latest member
Taps07

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top