
Share to Facebook
brings you the latest technology news, computer mods, computer news and the latest computer and notebook reviews.
Read the latest PC news.
Strategy: A VBA macro can be used to speed up a lot of jobs. I would never attempt this particular task without it, especially because the macro is so simple.
Enter these few lines of code in the VBA Editor. Select the dozens of cells. Run the macro. Pictures are added to every cell in the selection.Sub AddABunch()
For Each cell In Selection
MyPic = “C:\Qimage\QI” & cell.Value & “.jpg”
With cell.AddComment
.Shape.Fill.UserPicture MyPic
.Shape.Height = 300
.Shape.Width = 300
End With Next cell End Sub
Additional Details: For the complete guide to learning VBA, check out VBA & Macros for Microsoft Excel from QUE.
The above macro works because all of our company pictures are in the same folder with a common naming scheme.
Summary: A few lines of VBA code can turn a horribly monotonous jobinto a few seconds of work.
Commands Discussed: VBA
Microsoft Excel: Add A Pop-Up Picture To Multiple Cells
Tidak ada komentar:
Posting Komentar