<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Determine If Event Exists</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/09/02/determine-if-event-exists/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/09/02/determine-if-event-exists/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/02/determine-if-event-exists/#comment-2257</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Fri, 03 Sep 2004 11:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=746#comment-2257</guid>
		<description>&lt;p&gt;I personally wouldn&#039;t check for existence of strings within modules. My approach would be to leave that as an external auditing exercise.&lt;/p&gt;
&lt;p&gt;That leaves the following as a much shorter check:&lt;/p&gt;
&lt;p&gt;Sub test()&lt;br&gt;
    Dim bln As Boolean&lt;/p&gt;
&lt;p&gt;    bln = False&lt;br&gt;
    On Error Resume Next&lt;br&gt;
    bln = (ThisWorkbook.VBProject.VBComponents(ThisWorkbook.CodeName).CodeModule.ProcStartLine(&quot;Workbook_Open&quot;, vbext_pk_Proc) * 0 = 0)&lt;br&gt;
    On Error GoTo 0&lt;/p&gt;
&lt;p&gt;    MsgBox bln&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;PS: your site rocks - I love every day of it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I personally wouldn&#8217;t check for existence of strings within modules. My approach would be to leave that as an external auditing exercise.</p>
<p>That leaves the following as a much shorter check:</p>
<p>Sub test()<br />
    Dim bln As Boolean</p>
<p>    bln = False<br />
    On Error Resume Next<br />
    bln = (ThisWorkbook.VBProject.VBComponents(ThisWorkbook.CodeName).CodeModule.ProcStartLine(&#8220;Workbook_Open&#8221;, vbext_pk_Proc) * 0 = 0)<br />
    On Error GoTo 0</p>
<p>    MsgBox bln<br />
End Sub</p>
<p>PS: your site rocks &#8211; I love every day of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/02/determine-if-event-exists/#comment-2256</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 02 Sep 2004 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=746#comment-2256</guid>
		<description>&lt;p&gt;Another problem besides the Trust Access to Visual Basic Project setting is the name of the workbook&#039;s ThisWorkbook class module. Some people (like me) change this to something more descriptive.&lt;/p&gt;
&lt;p&gt;This will break:&lt;/p&gt;
&lt;p&gt;Workbooks(&quot;Book.xls&quot;).VBProject _&lt;br&gt;
  .VBComponents(&quot;ThisWorkbook&quot;).CodeModule&lt;/p&gt;
&lt;p&gt;so you need something like this (untested):&lt;/p&gt;
&lt;p&gt;Workbooks(&quot;Book.xls&quot;).VBProject _&lt;br&gt;
  .VBComponents(Workbooks(&quot;Book.xls&quot;).CodeName) _&lt;br&gt;
  .CodeModule&lt;/p&gt;
&lt;p&gt;- Jon&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Another problem besides the Trust Access to Visual Basic Project setting is the name of the workbook&#8217;s ThisWorkbook class module. Some people (like me) change this to something more descriptive.</p>
<p>This will break:</p>
<p>Workbooks(&#8220;Book.xls&#8221;).VBProject _<br />
  .VBComponents(&#8220;ThisWorkbook&#8221;).CodeModule</p>
<p>so you need something like this (untested):</p>
<p>Workbooks(&#8220;Book.xls&#8221;).VBProject _<br />
  .VBComponents(Workbooks(&#8220;Book.xls&#8221;).CodeName) _<br />
  .CodeModule</p>
<p>- Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ross</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/02/determine-if-event-exists/#comment-2255</link>
		<dc:creator>ross</dc:creator>
		<pubDate>Thu, 02 Sep 2004 18:07:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=746#comment-2255</guid>
		<description>&lt;p&gt;could a flag of some sort not be used?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>could a flag of some sort not be used?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

