<?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 Abort document close in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332405#M89548</link>
    <description>In A2K, is there a way to prevent the document to close ? There's no Cancel&lt;BR /&gt;
in the BeginClose event...&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
________________________________&lt;BR /&gt;
Alain Bouchard&lt;BR /&gt;
Graduate Student&lt;BR /&gt;
Geomatics Research Centre&lt;BR /&gt;
Laval University&lt;BR /&gt;
Sainte-Foy (Québec)&lt;BR /&gt;
G1K 7P4&lt;BR /&gt;
&lt;BR /&gt;
Alain.Bouchard@scg.ulaval.ca</description>
    <pubDate>Mon, 13 Nov 2000 19:42:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2000-11-13T19:42:06Z</dc:date>
    <item>
      <title>Abort document close</title>
      <link>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332405#M89548</link>
      <description>In A2K, is there a way to prevent the document to close ? There's no Cancel&lt;BR /&gt;
in the BeginClose event...&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
________________________________&lt;BR /&gt;
Alain Bouchard&lt;BR /&gt;
Graduate Student&lt;BR /&gt;
Geomatics Research Centre&lt;BR /&gt;
Laval University&lt;BR /&gt;
Sainte-Foy (Québec)&lt;BR /&gt;
G1K 7P4&lt;BR /&gt;
&lt;BR /&gt;
Alain.Bouchard@scg.ulaval.ca</description>
      <pubDate>Mon, 13 Nov 2000 19:42:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332405#M89548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-13T19:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Abort document close</title>
      <link>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332406#M89549</link>
      <description>Would something like this work?  I only have R14 here and it doesn't have a&lt;BR /&gt;
BeginClose event so couldn't test it.&lt;BR /&gt;
&lt;BR /&gt;
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)&lt;BR /&gt;
   If CommandName = UCase("CLOSE") Then&lt;BR /&gt;
      SendKeys "{Esc}"&lt;BR /&gt;
   End If&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
"Alain Bouchard" &lt;ALAIN.BOUCHARD&gt; wrote in message&lt;BR /&gt;
news:94B9952992E019AE01C87626A1A5E209@in.WebX.SaUCah8kaAW...&lt;BR /&gt;
&amp;gt; In A2K, is there a way to prevent the document to close ? There's no&lt;BR /&gt;
Cancel&lt;BR /&gt;
&amp;gt; in the BeginClose event...&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks&lt;BR /&gt;
&amp;gt; ________________________________&lt;BR /&gt;
&amp;gt; Alain Bouchard&lt;BR /&gt;
&amp;gt; Graduate Student&lt;BR /&gt;
&amp;gt; Geomatics Research Centre&lt;BR /&gt;
&amp;gt; Laval University&lt;BR /&gt;
&amp;gt; Sainte-Foy (Québec)&lt;BR /&gt;
&amp;gt; G1K 7P4&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Alain.Bouchard@scg.ulaval.ca&lt;BR /&gt;
&amp;gt;&lt;/ALAIN.BOUCHARD&gt;</description>
      <pubDate>Mon, 13 Nov 2000 21:40:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332406#M89549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-13T21:40:38Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332407#M89550</link>
      <description>Sorry, that doesn't work. The BeginCommand is raised only when the user type&lt;BR /&gt;
"Close", it's not raised if the user close AutoCAD for example. Also, you&lt;BR /&gt;
should never use SendKeys to send a message to AutoCAD, too risky. I'm&lt;BR /&gt;
looking for a function to lock the document, only to prevent closing, not&lt;BR /&gt;
editing.&lt;BR /&gt;
&lt;BR /&gt;
Thanks anyway&lt;BR /&gt;
&lt;BR /&gt;
Alain&lt;BR /&gt;
&lt;BR /&gt;
Michael Kintz &lt;MIKEK&gt; wrote in message&lt;BR /&gt;
news:8C1E9A8BC5036192074FE31A04278305@in.WebX.SaUCah8kaAW...&lt;BR /&gt;
&amp;gt; Would something like this work?  I only have R14 here and it doesn't have&lt;BR /&gt;
a&lt;BR /&gt;
&amp;gt; BeginClose event so couldn't test it.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)&lt;BR /&gt;
&amp;gt;    If CommandName = UCase("CLOSE") Then&lt;BR /&gt;
&amp;gt;       SendKeys "{Esc}"&lt;BR /&gt;
&amp;gt;    End If&lt;BR /&gt;
&amp;gt; End Sub&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; "Alain Bouchard" &lt;ALAIN.BOUCHARD&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:94B9952992E019AE01C87626A1A5E209@in.WebX.SaUCah8kaAW...&lt;BR /&gt;
&amp;gt; &amp;gt; In A2K, is there a way to prevent the document to close ? There's no&lt;BR /&gt;
&amp;gt; Cancel&lt;BR /&gt;
&amp;gt; &amp;gt; in the BeginClose event...&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Thanks&lt;BR /&gt;
&amp;gt; &amp;gt; ________________________________&lt;BR /&gt;
&amp;gt; &amp;gt; Alain Bouchard&lt;BR /&gt;
&amp;gt; &amp;gt; Graduate Student&lt;BR /&gt;
&amp;gt; &amp;gt; Geomatics Research Centre&lt;BR /&gt;
&amp;gt; &amp;gt; Laval University&lt;BR /&gt;
&amp;gt; &amp;gt; Sainte-Foy (Québec)&lt;BR /&gt;
&amp;gt; &amp;gt; G1K 7P4&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; Alain.Bouchard@scg.ulaval.ca&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/ALAIN.BOUCHARD&gt;&lt;/MIKEK&gt;</description>
      <pubDate>Mon, 13 Nov 2000 22:09:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/abort-document-close/m-p/332407#M89550</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2000-11-13T22:09:28Z</dc:date>
    </item>
  </channel>
</rss>

