Solved

Excel -- upon opening, promt for data input

Posted on 2013-11-03
3
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

688 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