Link to home
Start Free TrialLog in
Avatar of Bright01
Bright01Flag for United States of America

asked on

Decimal and Currency Macro with slight change

I have a fantastic little macro that MartinLiss and FanPages (FP) wrote for me and I need a small change.  I've attached the model and I need the SELECTION of the Currency to be on the first WS ("Customer - Input") instead of where it is now ("Currency" WS).  I have mocked up the F2 Cell in the desired location (in Green) and all I'm looking for is to select the Currency from the drop down menu, on the first worksheet (in Green Box) and have the macro work correctly (which it does now if you select the Currency in D4 of the "Currency"  WS (which can be deleted once the fix has been done).

That's it!

Thank you in advance,

B.

[Title modified by SouthMod]
Moving-the-Selection-for-Currenc.xlsm
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

You now have the currency selection in two places, sheets Currency and Customer Input. Is it going to stay that way?

In any case the basics of what you need to do is to copy the code from the Customer Worksheet_Change event add add it to the Customer_input Worksheet_Change event.
 You also need to move and modify these constants so that they match where the data is.
Const SelectedCurrency As String = "D4"
Const CurrencyList As String = "B4:B12"
Const ChangeCellStart As String = "E4"
Avatar of Bright01

ASKER

M.

The Currency Selection should only be on the Customer - Input WS; not the Currency Worksheet.  I copied the code from the Currency WS to the Customer - Input WS and changed the Const SelectedCurrency As String = "F2" but it didn't work.   I think this is because the Selection of Currency and the Currency table are now on different Worksheets.

I don't see a "Customer_Input Worksheet_Change" event.

Not so B.
I don't understand the phrase "copy the code from the Customer Worksheet_Change event add add it to the Customer_input Worksheet_Change event."  Do I copy it to the other worksheet and add a different name for the Change event?

B.
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Marty,

As usual........BRILLIANT!   THANK YOU!  Works like a charm..... you did throw me for a loop; you deleted (cleaned up) the column where the currency was chosen by deleting the column.  It took me 20 min. to figure out why it didn't work in my production WB! But with a simple change in Names, it worked perfectly!   I learn from you every time you answer a question from me...... and it only makes me better.

Again, much thanks,

B.
I apologize for forgetting to mention that I deleted that column. In any case you're welcome and I'm glad I was able to help.


Marty - MVP 2009 to 2013