worksheet_change event to replace words
i have a worksheet that will continuously be populated with the Words "TRUE" & "FALSE", i need a change event to find these words each time the entered and just replace them
So range is A1:R65536, "TRUE" would be changed to "YES" and "FALSE" would be changed to a blank cell.
Re: worksheet_change event to replace words
I would not want to scan the entire column upon the change event. I would evaluate the Target passed in parameter object to determine if its the desired column and if so then I would do a replace on the active cell. ;)
Re: worksheet_change event to replace words
Ok so its a checkbox from a userform if the value is set true i want it to say yes unless if the value is set as false i dont want it to store a value.
Re: worksheet_change event to replace words
better u fill as "yes" instead of "true" to avoid changing after fill, how do u fill the cells from userform?
Re: worksheet_change event to replace words
Simple command line :
vb Code:
Sheets(3).range(nrow, lrow + 0).value = checkbox1.value
But this just places the value true or false in the cell.
Re: worksheet_change event to replace words
just use a if statement
Code:
If checkbox1.value = True then
Sheets(3).range(nrow, lrow + 0) = "Yes"
End If
Re: worksheet_change event to replace words
Thank you bud, ill give it a whirl when i get home
Re: worksheet_change event to replace words
what is the use of adding 0 here?
Code:
Sheets(3).range(nrow, lrow + 0).value = checkbox1.value