Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Run a Macro when a data-entry cell is selected

Posted on 2013-06-02
4
Medium Priority
?
304 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 31

Accepted Solution

by:
gowflow earned 1500 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 31

Assisted Solution

by:gowflow
gowflow earned 1500 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 31

Assisted Solution

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

926 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