excel vba - Selecting Which Cells Can Be Active Cells -


i have created simple code place active cell address cell.

`sheets("esm").range("k16").value = activecell.address` 

i limit cells work code (e.g n5:ar7) can't quite work out. assume need somehow define range using "dim myrange" or similar.

would mind assisting?

just wrap code condition:

if not intersect(activecell, range("n5:ar7")) nothing     sheets("esm").range("k16").value = activecell.address end if 

Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -