Solved

Run a Macro when a data-entry cell is selected

Posted on 2013-06-02
4
260 Views
Last Modified: 2013-08-11
Attached is an example of a data-entry form. Currently, a user form is activated when the button "Show Data-Entry Userform" is clicked. I will like that when a user select a data entry cell (all color coded yellow cells) a macro is run which open a user form with a drop-down-list to select the best entry. For example if cell "I7" is selected a macro is run which open a user form in order to select the best entry from a drop-down-list. Please, I need advice on which is the best way to run the macro when a data-entry cell is selected.

Thanks

Dennis
Copy-of-UserformComboBoxQ2813937.xlsm
0
Comment
Question by:dcantel1
  • 3
4 Comments
 
LVL 29

Accepted Solution

by:
gowflow earned 500 total points
ID: 39216532
question :
You need the form to be activated only when you hit on I7 ?? or you want that on each and every field you need to fill ? then it will depend on your answer as seems your form only updates the field in I7

gowflow
0
 
LVL 29

Assisted Solution

by:gowflow
gowflow earned 500 total points
ID: 39216751
Well I was too quick with my previous post. I read again the comments in your workbook and looked at the code and now understand better what you need to acheive. You want the user when positioned on any of the colored (light yellow) cells to have a dropdown opened with the appropriate choices to choose from. You have noted that for item 7 and 11 you will have a special form attached.

What I did is very simple and it is as follows:

1) No need to use the Form you already created.
2) I created in the worksheet Data Names for the ones I immediately attached which you can see are surrounded by border line black in Col A, B, C, F and J
3) if you look at the dropdown in the left top corner cell on sheet data you will see Names created:
Flag
Received
Product
Labeling
Note
Product
Sample

4) these are few that you may expend on.
5) These Names refer to the data that is outlined to which, select say Flag and see what it will highlight, Select Product and you will see it select B2:B21 etc.... you may expand on these when you finish the drawing of your sheet Data.

6) In your sheet Form431 I used the Data Validation to associate these name ranges with the coresponding cell so that when you click on the specific cell you will see an arrow from which you can select the coresponding item.

7) The ones I linked to Name Ranges are the cells that have a darker yellow click on each and see the results.

Note
I could not link more as item 7, 10 and 11 have several sub items and your cells does not exactly refer to same heading items in sheet Data.

LEt me know if this is of any help
gowflow
Copy-of-UserformComboBoxQ2813937.xlsm
0
 
LVL 29

Assisted Solution

by:gowflow
gowflow earned 500 total points
ID: 39224811
Did you have a chance to try the proposed solution ?
gowflow
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
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.

896 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now