求助,关于“运行时错误55 文件以打开“
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">请教各位大侠,我编了一段程序,为什么运行时总显示 “运行时错误55 文件以打开”?</font></p><p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"></font> </p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana"></font> </p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">Option Explicit</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">Public Sub WriteTextFile()</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">'获得文件路径<br/>Dim FileName As String, FileNumber As Integer<br/>FileName = "D:\2.txt"<br/>FileNumber = FreeFile()</font></p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">'打开文件<br/>Open FileName For Output As #FileNumber<br/>'将图形中所有的点的坐标保存到文件中<br/> Dim point As AcadPoint<br/> For Each point In ThisDrawing.ModelSpace<br/> Dim ptcoordinates As Variant<br/> ptcoordinates = point.Coordinates<br/> Write #FileNumber, ptcoordinates(0), ptcoordinates(1), ptcoordinates(2)<br/> Next point<br/>'关闭文件<br/>Close #FileNumber<br/>End Sub<br/></font></p>
<p> </p>
<p> </p>
页:
[1]