<?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 : SaveAs hjælp</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : SaveAs hjælp]]></description>
  <pubDate>Sat, 05 Dec 2026 13:16:29 +0000</pubDate>
  <lastBuildDate>Wed, 23 Jun 2021 11:26:44 +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=4562</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[SaveAs hjælp : Problemet er l&#248;st.Det viser sig...]]></title>
   <link>https://forum.excel-regneark.dk/saveas-hjlp_topic4562_post22714.html#22714</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1869">MesterAAAA</a><br /><strong>Emne:</strong> 4562<br /><strong>Sendt:</strong> 23.Jun.2021 kl. 11:26<br /><br />Problemet er løst.<div>Det viser sig at saveas ikke er glad for onedrive/sharepoint.</div><div><br></div>]]>
   </description>
   <pubDate>Wed, 23 Jun 2021 11:26:44 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/saveas-hjlp_topic4562_post22714.html#22714</guid>
  </item> 
  <item>
   <title><![CDATA[SaveAs hjælp : Jeg har lavet f&#248;lgende script...]]></title>
   <link>https://forum.excel-regneark.dk/saveas-hjlp_topic4562_post22704.html#22704</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1869">MesterAAAA</a><br /><strong>Emne:</strong> 4562<br /><strong>Sendt:</strong> 18.Jun.2021 kl. 12:05<br /><br />Jeg har lavet følgende script men kan ikke få det til at virke. Er der en der kan se hvad jeg gør forkert?<div><br></div><div>Den kommer med Run-time error '1004': Method'SaveAs' of object'_Workbook' failed.</div><div>Den henviser til linien: ActiveWorkbook.SaveAs Filename:=FilOgBib, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False</div><div><br></div><div>Hvis jeg trykker på 'end' så har den oprettet bibliotekerne og filen er der også??</div><div>Det virker hvis bibliotekerne er oprettet i forvejen??</div><div><br></div><div>Håber at der er nogen som har nogle forslag til hvad jeg kan gøre.</div><div><br></div><div>--------------------------------------------------------</div><div><div>Sub SaveSheetUdregning()</div><div><br></div><div>Rem --- Tjek og opret kunde-mappe</div><div>Dim StdMappe As String</div><div>StdMappe = "C:\Users\hk\OneDrive\TILBUD\"</div><div>Dim KundeMappe As String</div><div>KundeMappe = Range("A2") 'Kundenavn</div><div>strValKundeMappe = KundeMappe</div><div>&nbsp; &nbsp; &nbsp; &nbsp; For i = 1 To Len(strValKundeMappe)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Select Case Asc(Mid(strValKundeMappe, i, 1))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 32, 48 To 57, 65 To 90, 97 To 122, 192 To 255</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' Leave ordinary characters alone 32=space, 48-57=tal, 65-90=A-Z, 97-122=a-z,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mid(strValKundeMappe, i, 1) = " "</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End Select</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Next i</div><div>If Len(Dir(StdMappe &amp; strValKundeMappe, vbDirectory)) = 0 Then</div><div>&nbsp; &nbsp; MkDir StdMappe &amp; strValKundeMappe</div><div>End If</div><div><br></div><div>Rem --- Tjek og opret sags-mappe</div><div>Dim SagsMappe As String</div><div>SagsMappe = Range("A3") 'Sag</div><div>strValSagsMappe = SagsMappe</div><div>&nbsp; &nbsp; &nbsp; &nbsp; For i = 1 To Len(strValSagsMappe)</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Select Case Asc(Mid(strValSagsMappe, i, 1))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 32, 48 To 57, 65 To 90, 97 To 122, 192 To 255</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ' Leave ordinary characters alone 32=space, 48-57=tal, 65-90=A-Z, 97-122=a-z,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mid(strValSagsMappe, i, 1) = " "</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End Select</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Next i</div><div>If Len(Dir(StdMappe &amp; strValKundeMappe &amp; "\" &amp; strValSagsMappe, vbDirectory)) = 0 Then</div><div>&nbsp; &nbsp; MkDir StdMappe &amp; strValKundeMappe &amp; "\" &amp; strValSagsMappe</div><div>End If</div><div><br></div><div>Rem --- Gem Tilbud</div><div>Dim x As String</div><div>x = Range("A1")</div><div>Dim FilOgBib As String</div><div>FilOgBib = StdMappe &amp; strValKundeMappe &amp; "\" &amp; strValSagsMappe &amp; "\" &amp; x &amp; " - UDREGNING - " &amp; strValSagsMappe &amp; ", " &amp; strValKundeMappe &amp; ".xlsm"</div><div><br></div><div>Dim TestStr As String</div><div>'Test File Path</div><div>&nbsp; On Error Resume Next</div><div>&nbsp; &nbsp; TestStr = Dir(FilOgBib)</div><div>&nbsp; On Error GoTo 0</div><div><br></div><div>'Determine if File exists</div><div>&nbsp; If TestStr = "" Then</div><div>&nbsp; &nbsp; ActiveWorkbook.SaveAs Filename:=FilOgBib, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False</div><div>&nbsp; &nbsp; MsgBox ("Fil er gemt")</div><div>&nbsp; Else</div><div>&nbsp; &nbsp; MsgBox ("Kan ikke gemme: FileExist=True")</div><div>&nbsp; End If</div><div><br></div><div>End Sub</div></div><div>--------------------------------------------------------</div>]]>
   </description>
   <pubDate>Fri, 18 Jun 2021 12:05:59 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/saveas-hjlp_topic4562_post22704.html#22704</guid>
  </item> 
 </channel>
</rss>