<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
	>
<channel>
	<title>Comments on: Validating file names</title>
	<atom:link href="http://www.blog.methodsinexcel.co.uk/2008/10/22/validating-file-names/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.methodsinexcel.co.uk/2008/10/22/validating-file-names/</link>
	<description></description>
	<lastBuildDate>Tue,  7 Feb 2012 16:37:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: JP</title>
		<link>http://www.blog.methodsinexcel.co.uk/2008/10/22/validating-file-names/comment-page-1/#comment-58061</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Thu, 23 Oct 2008 02:56:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.blog.methodsinexcel.co.uk/2008/10/22/validating-file-names/#comment-58061</guid>
		<description>I think it&#039;s more appropriate to create a function that validates your form fields, then either

a) call it from the &quot;OK&quot; button, and pop up a msgbox telling them which one was wrong (the function would have to return a value telling you which one), or
b) call it from the TextBox_Exit Event and just change the backcolor of the textbox to indicate that the field was filled out incorrectly (learned that from &quot;Professional Excel Development&quot; LOL). Perform the check again when the &quot;OK&quot; button gets clicked and stop the user.

I also like to use the following lines of code to highlight the offending textbox:

[VBA]
With txtFileName
  .SelStart = 0
  .SelLength = Len(.Value)
End With
[/VBA]

--JP</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s more appropriate to create a function that validates your form fields, then either</p>
<p>a) call it from the &#8220;OK&#8221; button, and pop up a msgbox telling them which one was wrong (the function would have to return a value telling you which one), or<br />
b) call it from the TextBox_Exit Event and just change the backcolor of the textbox to indicate that the field was filled out incorrectly (learned that from &#8220;Professional Excel Development&#8221; LOL). Perform the check again when the &#8220;OK&#8221; button gets clicked and stop the user.</p>
<p>I also like to use the following lines of code to highlight the offending textbox:</p>
<p>[VBA]<br />
With txtFileName<br />
  .SelStart = 0<br />
  .SelLength = Len(.Value)<br />
End With<br />
[/VBA]</p>
<p>&#8211;JP</p>
]]></content:encoded>
	</item>
</channel>
</rss>

