Get range of active object (image) in excel/VBA -
i know incredibly simple, can't seem figure out or find answer elsewhere. ill want range of selected image. in advance help.
here sample how top-left , botton-right cells of picture on excel sheet. picture has selected.
sub test() if (vba.typename(selection) = "picture") dim pic excel.picture set pic = selection dim topleft range set topleft = pic.topleftcell debug.print topleft.address dim bottomright range set bottomright = pic.bottomrightcell debug.print bottomright.address end if end sub
Comments
Post a Comment