I am trying to figure out how to write a code in VBA that would Clear the Contents of a cell. I have two sheets, sheet1 & sheet2. On sheet1 cell A1, there is a drop down box with selections of Colors, Numbers, Letters. Cell A2 has another dropdown box that is populated depending on the option you selected in A1, so if you choose Letters in A1 then the dropdown list only shows you A-Z for possible selections. If A1 was Numbers, you would get to choose numbers 1-100 on the drop down list of A2, etc...
The problem is if I already have A1 and A2 selected and if I want to make a new selection in A1, I drop down the list in A1 make a choice and A2 does not auto blank. So if I was to stop here I have an incorrect item showing in A2 until I click on the drop down box. So if I had my selection of Colors and B1 is Pink, and I went back up to A1 and now picked Numbers, my choice of Pink is still showing.
So I put a new tab, made a formula in Sheet2 cell A2 that said if Sheet1 A2 was a true selection and fell within the range of Colors then = 1 if not = 0, etc... so now if A2 really does not match up to the A1 selection then I get a 0.
Now I am trying to figure out how to write a code that says if Sheet2 cell A2 = 0 clearcontent of Sheet1 cell A2. This would be a simple building block for me to learn and build on for this. Thank you. Oh, I did try to record a marco, but was not able to assign it to the drop down box.
Right now I am stuck on this
Bookmarks