Sub popup(t, thefile) Set p = LoadPicture(thefile) h = 200 w = 200 * p.Width / p.Height With Range("a" + CStr(t)) .AddComment .Comment.Shape.Height = h .Comment.Shape.Width = w .Comment.Shape.Fill.UserPicture thefile End With End Sub
Hvor t blot er et række nummer ... og thefile er hele stien c:\\bla\gro.jpg
Sub indsetBillede() popup 10, "C:\Users\peter\Desktop\Eksp_Passiflora\IMG_0497.jpg" End Sub Sub popup(t, thefile) Set p = LoadPicture(thefile) h = 200 w = 200 * p.Width / p.Height With Range("a" + CStr(t)) .AddComment .Comment.Shape.Height = h .Comment.Shape.Width = w .Comment.Shape.Fill.UserPicture thefile
Application.ScreenUpdating = False
Application.DisplayAlerts = False Application.SendKeys "%a~" Application.CommandBars.ExecuteMso "PicturesCompress" Application.SendKeys "{ENTER}" End With End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.