<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296989#M70396</link>
    <description>Unless I am misunderstanding this thread and/or your problem, simply &lt;BR /&gt;
use:&lt;BR /&gt;
&lt;BR /&gt;
Sub RemoveProj ()&lt;BR /&gt;
  Dim objProj as VBProject&lt;BR /&gt;
  Dim objIDE As VBE&lt;BR /&gt;
  Set objIDE = Application.VBE&lt;BR /&gt;
  '---------------------------------&lt;BR /&gt;
  'Iterate thru the VBE looking for&lt;BR /&gt;
  'any currently loaded projects&lt;BR /&gt;
  '---------------------------------&lt;BR /&gt;
  For Each objProj in objIDE.VBProjects&lt;BR /&gt;
    If objProj.Name = "MY_APP" Then &lt;BR /&gt;
      objIDE.VBProjects.Remove objProj&lt;BR /&gt;
    End If&lt;BR /&gt;
  Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
===============================&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
PhD @ CADalyst's AutoCAD Clinic&lt;BR /&gt;
http://www.cadonline.com</description>
    <pubDate>Thu, 26 Sep 2002 09:55:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-09-26T09:55:57Z</dc:date>
    <item>
      <title>embedded macros</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296982#M70389</link>
      <description>hi&lt;BR /&gt;
&lt;BR /&gt;
i was wondering if it was possible to extract an embedded macro via vba&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
cheers&lt;BR /&gt;
mark</description>
      <pubDate>Mon, 23 Sep 2002 15:25:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296982#M70389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-23T15:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: embedded macros</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296983#M70390</link>
      <description>As far as i know,its not possible. But if you save the macro in to module or&lt;BR /&gt;
else you can import it  .&lt;BR /&gt;
&lt;BR /&gt;
"Mark Dubbelaar" &lt;MDUBBELAAR&gt; wrote in message&lt;BR /&gt;
news:3344C0BEEE568493D30B8EC584AB2431@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; hi&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; i was wondering if it was possible to extract an embedded macro via vba&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; thanks in advance&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; cheers&lt;BR /&gt;
&amp;gt; mark&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/MDUBBELAAR&gt;</description>
      <pubDate>Mon, 23 Sep 2002 20:19:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296983#M70390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-23T20:19:22Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296984#M70391</link>
      <description>Mark, It depends if you want to do it programmatically or not. If not, you can export/import modules as suggested before. Otherwise you can use the Application.VBE object to gain access to the vlide. Access a project via the VBProjects collection or the Application.ActiveProject property. Read/write code to the project's CodeModule.</description>
      <pubDate>Tue, 24 Sep 2002 08:04:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296984#M70391</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2002-09-24T08:04:47Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296985#M70392</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;ed,&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;what i am trying to do, is automatically extract an &lt;BR /&gt;
embedded macro (if it exists)... when i first start using VBA i had a template &lt;BR /&gt;
with an embedded project in it (i thought this was the only to achieve what i &lt;BR /&gt;
was after) but later i found that you could use the acad.dvb to load vba &lt;BR /&gt;
files... and hence i have a whole lot of drawings with this file embedded, which &lt;BR /&gt;
is no longer needed.... if there is a way to programmatically extract the &lt;BR /&gt;
embedded routine that would be good, otherwise i'll have to bit the bullet and &lt;BR /&gt;
manually extract it....&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;cheers&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&amp;nbsp;mark&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"Ed_Jobe" &amp;lt;eljobe&amp;gt; wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f111524.1@WebX.maYIadrTaRb"&amp;gt;news:f111524.1@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;Mark, &lt;BR /&gt;
  It depends if you want to do it programmatically or not. If not, you can &lt;BR /&gt;
  export/import modules as suggested before. Otherwise you can use the &lt;BR /&gt;
  Application.VBE object to gain access to the vlide. Access a project via the &lt;BR /&gt;
  VBProjects collection or the Application.ActiveProject property. Read/write &lt;BR /&gt;
  code to the project's CodeModule.&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 24 Sep 2002 22:00:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296985#M70392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-24T22:00:03Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296986#M70393</link>
      <description>I havn't tried to do what you ask, but I've seen other code segments that read/write to code modules, so it should be possible. Use the object browser to get familiar with the objects I mentioned earlier.</description>
      <pubDate>Wed, 25 Sep 2002 07:02:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296986#M70393</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2002-09-25T07:02:05Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296987#M70394</link>
      <description>After looking into it further, you won't be able to use the VBE object since the vbaide doesn't have the ability to extract/embed vba. The vbaman dialog is the only thing in acad that will do it and unfortunately it will not run as a command line version, so you can't script it either.</description>
      <pubDate>Wed, 25 Sep 2002 10:28:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296987#M70394</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2002-09-25T10:28:28Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296988#M70395</link>
      <description>&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;thanks for your help ed... i thought that might be &lt;BR /&gt;
the case&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;BR /&gt;
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"&amp;gt;&lt;BR /&gt;
  &lt;DIV&gt;"Ed_Jobe" &amp;lt;eljobe&amp;gt; wrote in message &lt;A&gt;&lt;BR /&gt;
  href="news:f111524.4@WebX.maYIadrTaRb"&amp;gt;news:f111524.4@WebX.maYIadrTaRb&lt;/A&gt;...&lt;/DIV&gt;After &lt;BR /&gt;
  looking into it further, you won't be able to use the VBE object since the &lt;BR /&gt;
  vbaide doesn't have the ability to extract/embed vba. The vbaman dialog is the &lt;BR /&gt;
  only thing in acad that will do it and unfortunately it will not run as a &lt;BR /&gt;
  command line version, so you can't script it either.&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 25 Sep 2002 22:44:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296988#M70395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-25T22:44:48Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296989#M70396</link>
      <description>Unless I am misunderstanding this thread and/or your problem, simply &lt;BR /&gt;
use:&lt;BR /&gt;
&lt;BR /&gt;
Sub RemoveProj ()&lt;BR /&gt;
  Dim objProj as VBProject&lt;BR /&gt;
  Dim objIDE As VBE&lt;BR /&gt;
  Set objIDE = Application.VBE&lt;BR /&gt;
  '---------------------------------&lt;BR /&gt;
  'Iterate thru the VBE looking for&lt;BR /&gt;
  'any currently loaded projects&lt;BR /&gt;
  '---------------------------------&lt;BR /&gt;
  For Each objProj in objIDE.VBProjects&lt;BR /&gt;
    If objProj.Name = "MY_APP" Then &lt;BR /&gt;
      objIDE.VBProjects.Remove objProj&lt;BR /&gt;
    End If&lt;BR /&gt;
  Next&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
===============================&lt;BR /&gt;
Mike Tuersley&lt;BR /&gt;
PhD @ CADalyst's AutoCAD Clinic&lt;BR /&gt;
http://www.cadonline.com</description>
      <pubDate>Thu, 26 Sep 2002 09:55:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296989#M70396</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-26T09:55:57Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296990#M70397</link>
      <description>You might be able to use CodeModule.DeleteLines to wipe out all the code.&lt;BR /&gt;
This should work if macro is in ThisDrawing module. If it's in another&lt;BR /&gt;
module, you should be able to delete the module.&lt;BR /&gt;
&lt;BR /&gt;
"Mike Tuersley" &lt;MIKE.TUERSLEY&gt; wrote in message&lt;BR /&gt;
news:MPG.17fd10c9ac695e80989688@discussion.autodesk.com...&lt;BR /&gt;
&amp;gt; Unless I am misunderstanding this thread and/or your problem, simply&lt;BR /&gt;
&amp;gt; use:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Sub RemoveProj ()&lt;BR /&gt;
&amp;gt;   Dim objProj as VBProject&lt;BR /&gt;
&amp;gt;   Dim objIDE As VBE&lt;BR /&gt;
&amp;gt;   Set objIDE = Application.VBE&lt;BR /&gt;
&amp;gt;   '---------------------------------&lt;BR /&gt;
&amp;gt;   'Iterate thru the VBE looking for&lt;BR /&gt;
&amp;gt;   'any currently loaded projects&lt;BR /&gt;
&amp;gt;   '---------------------------------&lt;BR /&gt;
&amp;gt;   For Each objProj in objIDE.VBProjects&lt;BR /&gt;
&amp;gt;     If objProj.Name = "MY_APP" Then&lt;BR /&gt;
&amp;gt;       objIDE.VBProjects.Remove objProj&lt;BR /&gt;
&amp;gt;     End If&lt;BR /&gt;
&amp;gt;   Next&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ===============================&lt;BR /&gt;
&amp;gt; Mike Tuersley&lt;BR /&gt;
&amp;gt; PhD @ CADalyst's AutoCAD Clinic&lt;BR /&gt;
&amp;gt; http://www.cadonline.com&lt;/MIKE.TUERSLEY&gt;</description>
      <pubDate>Fri, 27 Sep 2002 08:30:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/embedded-macros/m-p/296990#M70397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-09-27T08:30:56Z</dc:date>
    </item>
  </channel>
</rss>

