View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.programming
[email protected] rcmail14872@yahoo.com is offline
external usenet poster
 
Posts: 13
Default parse cell contents

I figured out how to get the code to work that sets a reference. No
matter which code I run the line: strDate = REMid(c.Text, PatternDate)
strDate comes up empty, when I hover over it I get empty double quotes,
even when the only content of the cell is 1/1/2006


Ron Rosenfeld wrote:
On 25 Sep 2006 08:33:53 -0700, wrote:

Thank you so much for the code. With the last code, the one the sets a
reference, I get the following error message: "Programmatic access to
Visual Basic Project is not trusted", probably because I am working on
a corporate pc that as restricted access rights.


In Excel, go to Tools/Options/Security and select Macro Security. Then choose
either medium or low for developmental work.

At some time, you may wish to have your IT personnel set this up as a signed
macro.


Regarding the
morefunc add-in where do I find the Menu option
to embed it within the worksheet, is this something I have to set?


At the time of installation, you should get an option to install this menu
item. After installed it will appear at Tools/Morefunc.


With the other code, that has this line:

ValidEntry = IsDate(strDate) Or Left(c.Text, 1) Like "[Ff]"

the problem is that dates are not recognized when they are accompanied
by other text.


Why should that be a problem in that line? A ValidEntry either

1. Consists solely of a date
2. Starts with an "f" or "F
3. Or starts with a valid date and is followed by text.

Since strDate consists of only the date portion of the string, or would be null
if there is no date, the contents of the rest of the string is irrelevant for
this initial test.

The remainder of the string, if present, gets tested further down.
--ron