<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Dansk Regneark Forum : Indsætte billeder fra folder</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : Indsætte billeder fra folder]]></description>
  <pubDate>Sat, 05 Dec 2026 06:54:33 +0000</pubDate>
  <lastBuildDate>Sun, 01 Nov 2020 11:44:41 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.08</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.excel-regneark.dk/RSS_post_feed.asp?TID=4391</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Dansk Regneark Forum]]></title>
   <url>https://forum.excel-regneark.dk/css_styles/Excel-regneark.dk/logo.png</url>
   <link>https://forum.excel-regneark.dk/</link>
  </image>
  <item>
   <title><![CDATA[Indsætte billeder fra folder : HejJeg fandt dette &amp;#034;gamle&amp;#034;...]]></title>
   <link>https://forum.excel-regneark.dk/indstte-billeder-fra-folder_topic4391_post21748.html#21748</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=158">Goldie</a><br /><strong>Emne:</strong> 4391<br /><strong>Sendt:</strong> 01.Nov.2020 kl. 11:44<br /><br />Hej&nbsp;<div>Jeg fandt dette "gamle" indlæg&nbsp;<a href="https://forum.excel-regneark.dk/indstte-billeder-automatisk_topic53.html">https://forum.excel-regneark.dk/indstte-billeder-automatisk_topic53.html</a></div><div>men der er nogle små rettelser som ikke er lykkedes at finde på nettet.</div><div>Den første: Når der klikker på knappen "Opdater alle" indsættes alle billeder oven på de eksisterende. Kan det gøres så der eksisterende billeder bliver slettet og derefter aktuelle billeder bliver sat in.&nbsp;</div><div>Det andet: når billederne bliver indsat ville jeg gerne have den centeret i cellen og rækken automatisk blev justeret til f.eks. 35 i højden.&nbsp;</div><div><br></div><div>Her er koden fra modulet</div><div><br></div><div><div>Public Const DefExtention = ".jpg"</div><div>Public Const DefLocation = "C:\Foto\"</div><div>Public Const IndtastningsKolonneBogstav = "A"</div><div>Public Const IndtastningsKolonnenr = 1</div><div>Public Const IndtastningsStartRaekke = 2</div><div>Public Const IndtastningsSlutRaekke = 20</div><div><br></div><div>Sub Batch()</div><div>For Each c In Ark1.Range(IndtastningsKolonneBogstav &amp; IndtastningsStartRaekke &amp; ":" &amp; IndtastningsKolonneBogstav &amp; IndtastningsSlutRaekke).Cells</div><div>&nbsp; &nbsp; InsertPictureInRange DefLocation &amp; c.Value &amp; DefExtention, c.Offset(0, 1)</div><div>Next c</div><div>End Sub</div><div><br></div><div>Sub InsertPictureInRange(PictureFileName As String, TargetCells As Range)</div><div><br></div><div>Dim p As Object, t As Double, l As Double, w As Double, h As Double</div><div>&nbsp; &nbsp; If TypeName(ActiveSheet) &lt;&gt; "Worksheet" Then Exit Sub</div><div>&nbsp; &nbsp; If Dir(PictureFileName) = "" Then Exit Sub</div><div><br></div><div>&nbsp; &nbsp; Set p = ActiveSheet.Pictures.Insert(PictureFileName)</div><div><br></div><div>&nbsp; &nbsp; With TargetCells</div><div>&nbsp; &nbsp; &nbsp; &nbsp; t = .Top</div><div>&nbsp; &nbsp; &nbsp; &nbsp; l = .Left</div><div>&nbsp; &nbsp; &nbsp; &nbsp; w = .Offset(0, .Columns.Count).Left - .Left</div><div>&nbsp; &nbsp; &nbsp; &nbsp; h = .Offset(.Rows.Count, 0).Top - .Top</div><div>&nbsp; &nbsp; End With</div><div><br></div><div>&nbsp; &nbsp; With p</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Top = t</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Left = l</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Width = w</div><div>&nbsp; &nbsp; &nbsp; &nbsp; .Height = h</div><div>&nbsp; &nbsp; End With</div><div>&nbsp; &nbsp; Set p = Nothing</div><div>End Sub</div></div><div><br></div><div>På forhånd tusind tak for hjælp</div>]]>
   </description>
   <pubDate>Sun, 01 Nov 2020 11:44:41 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/indstte-billeder-fra-folder_topic4391_post21748.html#21748</guid>
  </item> 
 </channel>
</rss>