SquareCare
New Member
- Joined
- Mar 24, 2023
- Messages
- 6
- Office Version
- 365
- 2016
- Platform
- Windows
Hello!
I'm quite new to the more advanced tools in Ecxel and I have never used VBA before, but I have some limited experience with programming in general.
The worksheet is a calculator to help my colleagues calculate the prices of contracts before sending a quote to a customer. What I'm trying to acheive is as follows.
I have a drop-down list in cell B5 with "Standard price" and "Custom price".
I would like cells D9 and D10 to have a standard price of 750 and 950 respectively.
When B5 is set to "Standard price" I want cell D9 and D10 to be locked and show their standard values as mentioned above.
When B5 is set to "Custom price" I want the cells to be unlocked so that the user can enter a custom price.
If the user first sets cell B5 to "Custom price" and changes the values in D9 and D10, and then sets B5 to "Standard price" i want the value in D9 and D10 to reset to their
standard values again and be locked.
Bonus if possible: When "Standard price" is selected, it would be nice to have the text in D9 and D10 be slightly more gray than black to indicate the locked state.
Is this possible? If yes, could you please help me out?
Thank you for any help!
/Nick
I'm quite new to the more advanced tools in Ecxel and I have never used VBA before, but I have some limited experience with programming in general.
The worksheet is a calculator to help my colleagues calculate the prices of contracts before sending a quote to a customer. What I'm trying to acheive is as follows.
I have a drop-down list in cell B5 with "Standard price" and "Custom price".
I would like cells D9 and D10 to have a standard price of 750 and 950 respectively.
When B5 is set to "Standard price" I want cell D9 and D10 to be locked and show their standard values as mentioned above.
When B5 is set to "Custom price" I want the cells to be unlocked so that the user can enter a custom price.
If the user first sets cell B5 to "Custom price" and changes the values in D9 and D10, and then sets B5 to "Standard price" i want the value in D9 and D10 to reset to their
standard values again and be locked.
Bonus if possible: When "Standard price" is selected, it would be nice to have the text in D9 and D10 be slightly more gray than black to indicate the locked state.
Is this possible? If yes, could you please help me out?
Thank you for any help!
/Nick