<?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 : Filer/Folders på Mac</title>
  <link>https://forum.excel-regneark.dk/</link>
  <description><![CDATA[Dette er et XML Feed af; Dansk Regneark Forum : Makro og VBA : Filer/Folders på Mac]]></description>
  <pubDate>Sat, 05 Dec 2026 18:44:43 +0000</pubDate>
  <lastBuildDate>Sat, 10 Jan 2015 16:54:07 +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=1931</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[Filer/Folders på Mac : Har l&#248;st problemet med f&#248;lgende...]]></title>
   <link>https://forum.excel-regneark.dk/filer-folders-pa-mac_topic1931_post9059.html#9059</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1245">jespergn</a><br /><strong>Emne:</strong> 1931<br /><strong>Sendt:</strong> 10.Jan.2015 kl. 16:54<br /><br /><div>Har løst problemet med følgende kode:</div><div><br></div><span style="line-height: 1.4;">Option Explicit</span><div><br></div><div>Function CheckIfFolderExists(s As String) As Boolean</div><div>&nbsp; &nbsp; On Error Resume Next</div><div>&nbsp; &nbsp; GetAttr (ThisWorkbook.Path &amp; Application.PathSeparator &amp; s)</div><div><br></div><div>&nbsp; &nbsp; If Err.Number = 0 Then</div><div>&nbsp; &nbsp; &nbsp; &nbsp; CheckIfFolderExists = True</div><div>&nbsp; &nbsp; Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; CheckIfFolderExists = False</div><div>&nbsp; &nbsp; End If</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; On Error GoTo 0 ' turns of Error Resume next</div><div>End Function</div><div><br></div><div><br></div><div>Public Sub Ex12_8()</div><div><br></div><div>If CheckIfFolderExists("Employees") = True Then</div><div>&nbsp; &nbsp; MsgBox "The folder already exists"</div><div>&nbsp; &nbsp; Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; MkDir (ThisWorkbook.Path &amp; Application.PathSeparator &amp; "Employees")</div><div>&nbsp; &nbsp; End If</div><div><br></div><div>If CheckIfFolderExists("FormerEmployees") = True Then</div><div>&nbsp; &nbsp; MsgBox "The folder already exists"</div><div>&nbsp; &nbsp; Else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; MkDir (ThisWorkbook.Path &amp; Application.PathSeparator &amp; "FormerEmployees")</div><div>&nbsp; &nbsp; End If</div><div><br></div><div>End Sub</div><div><br></div><div>Public Sub Ex12_9()</div><div>Dim name As String</div><div>Dim begindate As Date</div><div>Dim W As Workbook</div><div>Dim strPath As String</div><div>Dim stPath As String</div><div>&nbsp; &nbsp;</div><div>strPath = ThisWorkbook.Path &amp; Application.PathSeparator &amp; "Employees"</div><div><br></div><div>name = InputBox("Type the name of the new employee:")</div><div>MkDir (strPath &amp; Application.PathSeparator &amp; name)</div><div><br></div><div>begindate = InputBox("Type the start date of " &amp; name)</div><div><br></div><div>stPath = strPath &amp; Application.PathSeparator &amp; name</div><div><br></div><div><br></div><div><br></div><div>&nbsp; &nbsp; Set W = Workbooks.Add</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A1") = name</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A2") = begindate</div><div>&nbsp; &nbsp; W.SaveAs Filename:=stPath &amp; Application.PathSeparator &amp; "PersonalData"</div><div>&nbsp; &nbsp; W.Close</div><div><br></div><div>&nbsp; &nbsp; Set W = Workbooks.Add</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A1") = name</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A2") = begindate</div><div>&nbsp; &nbsp; W.SaveAs Filename:=stPath &amp; Application.PathSeparator &amp; "Training"</div><div>&nbsp; &nbsp; W.Close</div><div><br></div><div>&nbsp; &nbsp; Set W = Workbooks.Add</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A1") = name</div><div>&nbsp; &nbsp; W.Worksheets("Sheet1").Range("A2") = begindate</div><div>&nbsp; &nbsp; W.SaveAs Filename:=stPath &amp; Application.PathSeparator &amp; "Salary"</div><div>&nbsp; &nbsp; W.Close</div><div><br></div><div>End Sub</div><div><br></div><div><br></div><div><br></div><div>Men nu skal jeg have lavet en sub der gør det muligt at flytte de folders der hedder "Name" fra "Employees" til "FormerEmployees"</div><div><br></div><div>Windows versionen ser sådan ud:</div><div><br></div><div><div>Sub Exercise12_10()</div><div>&nbsp; &nbsp; Dim sys As FileSystemObject</div><div>&nbsp; &nbsp; Dim f As Folder</div><div>&nbsp; &nbsp; Dim Name As String ' name of employee</div><div>&nbsp;</div><div>&nbsp; &nbsp; Set sys = New FileSystemObject</div><div><br></div><div>&nbsp; &nbsp; Name = InputBox("Please enter the name of the employee whos employment stops:")</div><div><br></div><div>&nbsp; &nbsp; Set f = sys.GetFolder(ThisWorkbook.Path &amp; "\Employees\" &amp; Name)</div><div><br></div><div>&nbsp; &nbsp; f.Move (ThisWorkbook.Path &amp; "\FormerEmployees\" &amp; Name)</div><div>End Sub</div></div>]]>
   </description>
   <pubDate>Sat, 10 Jan 2015 16:54:07 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/filer-folders-pa-mac_topic1931_post9059.html#9059</guid>
  </item> 
  <item>
   <title><![CDATA[Filer/Folders på Mac : Hej.Jeg skal lave en VBA der laver...]]></title>
   <link>https://forum.excel-regneark.dk/filer-folders-pa-mac_topic1931_post9058.html#9058</link>
   <description>
    <![CDATA[<strong>Forfatter:</strong> <a href="https://forum.excel-regneark.dk/member_profile.asp?PF=1245">jespergn</a><br /><strong>Emne:</strong> 1931<br /><strong>Sendt:</strong> 10.Jan.2015 kl. 14:12<br /><br />Hej.<div><br></div><div>Jeg skal lave en VBA der laver to folders som jeg godt kan finde ud af:</div><div><br></div><div>MkDir (ThisWorkbook.Path &amp; Application.PathSeparator &amp; "Folder1")</div><div><span style="line-height: 1.4;">MkDir (ThisWorkbook.Path &amp; Application.PathSeparator &amp; "Folder2")</span></div><div><br></div><div>Jeg ved at disse bliver gemt i mappen overførsler. Men hvorfor??</div><div><br></div><div>Nå, men derefter skal jeg via en inputbox skulle kunne lave en subfolder, under folder1 eller folder2.</div><div><br></div><div>Inputboxen skal stille to spørgsmål fx. "Navn" og "alder."&nbsp;</div><div><br></div><div>"Navn" skal være det nye navn på den nye folder.</div><div><br></div><div>Hver gang der bliver oprettet en ny folder skal den indeholder tre excel-filer med evt. "Fil1" "Fil2" og "Fil3"</div><div><br></div><div>Derudover skal der i alle filerne skrives "Navn" og "Alder" fra input boxen i celle A1 og A2.</div><div><br></div><div>Nogle der kan hjælpe?</div>]]>
   </description>
   <pubDate>Sat, 10 Jan 2015 14:12:59 +0000</pubDate>
   <guid isPermaLink="true">https://forum.excel-regneark.dk/filer-folders-pa-mac_topic1931_post9058.html#9058</guid>
  </item> 
 </channel>
</rss>