Dear all,
I'm new in VBA and cannot handle it. I would like to ask you to provide me some references where I could learn it, so to that starts to be familiar with it.
I have a small problem. Basic idea is, sheet is protected (empty password), and only cell "C2" is unlocked (allowable to edit). Based on content in cell "C2", i want to enable or disable cell "A2" as it follows: if cell "C2" is "LIQUID", just enable ONLY cell "A2" from entire sheet, if content is "GAS" then keep the cell "A2" locked, and give to it (cell "A2" a certain value with will be calculated within program), if it is empty, then do nothing (but it is supposed that it won't be empty).
I have a small code with does the work only partially. It works perfectly for "Liquid" case and empty case, but it doesn't work for "Gas" case. Actually it works for "Gas" as well because it does what I want, but at the end I'm getting a error, and excel crushes. The error type is: "Run-time error 28: out of stack space". Could someone come up with an idea, please?
Here you are the code
Also I have atached the excel file to see better error.
Any idea are appreciated.
Thank you.
Bookmarks