excel - I need to grayed a cell out depending on user input using vba -
so have list of information need user submit can included in different sheet.(see pic below) want code gray out row if picked. if user inputs "starting" time, want row "dependency" gray out, , user won't able use it. if user clicks "dependency" "starting time" needs gray out. here current code.
sub finddata() dim finalrow integer dim integer dim workflows string sheets("sheet1") workflows = .range("c5").value servergri = .range("c9").value gridf = .range("c9").value starttime = .range("c11").value end sheets("sheet3") finalrow = .range("c" & rows.count).end(xlup).row = 5 finalrow if .cells(i, 3) = workflows , (.cells(i, 4) = servergri or .cells(i, 5) = gridf) .rows(i).insert 'add new information new row. 'the new row number still = .cells(i, 3) = workflows .cells(i, 4) = servergri .cells(i, 6) = starttime .cells(i, 3).resize(2, 4).interior.colorindex = 8 'if want add 1 row should exit loop exit end if next end sheets("sheet1").range("c9").clearcontents end sub
Comments
Post a Comment