[求助]如何在获取当前VBA工程的路径?
<p>如题</p><p>谢谢</p> <p>Public Function GetDirPath() As String<br/> Dim strFileName<br/> strFileName = VBE.ActiveVBProject.fileName 'VBE.ActiveVBProject.FileName获取.dvb文件的文件名<br/> GetDirPath = Left$(strFileName, InStrRev(strFileName, "\"))<br/>End Function</p> <p>dim strpath as string '当前工程所在路径</p><p>strpath=thisdrawing.application.vbe.activeVBProject.filename</p><p>strpath=left $ (strpath,len(strpath)-len("XXXX.dvb"))</p>
页:
[1]