i trying use macro-enabled button insert pictures in same row. use spread sheet work capture facility issues, , want able add multiple pictures of these issues next cells have text explanation of issue. below use, places 1 picture in column g of row (row 5 in example)
sub changeimage() application.filedialog(msofiledialogfilepicker) .allowmultiselect = false .buttonname = "submit" .title = "select image file" .filters.clear .filters.add "jpg", "*.jpg" .filters.add "jpeg file interchange format", "*.jpeg" .filters.add "graphics interchange format", "*.gif" .filters.add "portable network graphics", "*.png" .filters.add "tag image file format", "*.tiff" .filters.add "all pictures", "*.*" if .show = -1 dim img object set img = activesheet.pictures.insert(.selecteditems(1)) 'scale image size 'img.shaperange.scalewidth 0.75, msofalse, msoscalefromtopleft 'img.shaperange.scaleheight 0.75, msofalse, msoscalefromtopleft 'position image img.left = range("g5").left img.top = range("g5").top 'set image sizes in points (72 point per inch) img.width = 350 img.height = 350 else msgbox ("cancelled.") end if end end sub
i want macro able realize pictures have been added , place next picture starting @ right end of last uploaded picture.
thank in advance,
Comments
Post a Comment