Solved

Excel -- upon opening, promt for data input

Posted on 2013-11-03
3
204 Views
Last Modified: 2013-11-03
Experts:

I have a spreadsheet where two critical values drive several associated calculations.

At this time, I've added a simple note in the XLS "reminding" users to ensure reviewing/updated those two values.  

However, to ensure they actually are reviewed/changed, I would like to force their data entry upon opening the spreadsheet.

Value #1 (in cell D1): it is an integer ranging between 15 to 25
Value #2 (in cell D2): it is a fraction.   It can take on only 3 values (i.e., 1/2, 1/3, or 1/4)

Ideally, the on-opening pop-form will utilize a drop-down menu for value #1.   Alternatively, for value #2, radio buttons (or also a drop-down menu) would be great.

Does anyone know how to a) develop the VBA and b) build this linked form?

Thanks,
EEH
0
Comment
Question by:ExpExchHelp
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 350 total points
ID: 39619777
Try this macro in the workbook module

Private Sub Workbook_Open()
Range("D1") = InputBox("Enter a value from 15 to 25", "Cell D1")
Range("D2") = "=" & InputBox("Enter a 1/2, 1/3 or 1/4", "Cell D2")
End Sub
0
 

Author Comment

by:ExpExchHelp
ID: 39619790
ssaqibh:

Thx... I've added the code to a module (see attached JPG).

Upon opening the XLS, I'm not prompted for data entry.... it goes straight to the worksheet.

Is there another setting I must verify in order for the macro to be called?

EEH
VBA.jpg
0
 
LVL 27

Assisted Solution

by:MacroShadow
MacroShadow earned 150 total points
ID: 39619796
Don't put it in a new module, put it in the "ThisWorkbook" module.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nested excel formula 5 29
Compare Excel spreadsheet - 1 3 36
Desktop in File-open on Excel 7 29
Conditional fromatting formula 29 29
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question