View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] stevewy@hotmail.com is offline
external usenet poster
 
Posts: 23
Default Tell what format each cell is in

On 16 July, 13:54, "Peter T" <peter_t@discussions wrote:
I don't follow your intention of wanting the activecell, that's merely where
the cursor happens to be. For most purposes in VBA you do not need to know
the activecell.

You could make simple change event routine to validate the entry on input,
and if necessary alter it. If you preformat the cells as text before
entering any data the problem shouldn't arise.


The data wouldn't be entered manually. If we extract any data from
our own applications/databases, it would normally extract it to the
clipboard, and we would format the sheet as text before pasting it
in. However, most times we receive the data already in Excel and
occasionally we get this "thinks its a date" problem, which I was
trying to resolve.

As I would not be the only person using this macro, I would prefer it
just to identify possible problem cells rather than changing them
itself. All I really need is a macro that identifies date-format
cells in the active sheet. It may not be the most efficient way, but
it is the way that will work the best for the people who will be using
the macro.

Steve