Data entry via Userform

D

Dorian

I have created a userform which displays when my document closes.
For some reason the cursor is not positioned to the top left. It's as though
there is a space character in the first position.
Does anyone know why this is and can I prevent it?
Thanks.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
G

Gordon Bentley-Mix

Dorian,

Is there a space or does it just *look* like there's a space?

If the former then in the VBE *carefully* check the .Value property of the
control (I'm assuming it's a TextBox). I suspect that, while it looks blank,
it actually contains a single space.

And if the latter... umm... I have no idea. Have you tried deleting and
re-inserting the TextBox?
--
Cheers!

Gordon Bentley-Mix
Word MVP

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 
D

Dorian

It is a textbox and no value is moved to it and properties contains no value.
It looks like there is a space in first position. I cannot backspace over it.
If I enter nothing then an if .... = vbnullstring is TRUE. This is the first
time I've ever used a Userform so I am completely perplexed as to why this is
happening.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
D

Dorian

It is a textbox and no value is moved to it and properties contains no value.
It looks like there is a space in first position. I cannot backspace over it.
If I enter nothing then an if .... = vbnullstring test is TRUE. This is the
first time I've ever used a Userform so I am completely perplexed as to why
this is happening.

-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
G

Gordon Bentley-Mix

Dorian,

What you're seeing is standard behaviour. TextBoxes just look like that. ;-P
They provide a bit of padding so the text doesn't appear too close to the
edge. In addition, different monitors and video adapters sometime render
UserForms slightly differently, so this padding ensures that TextBoxes look
OK. If all of your TextBoxes look the same, I wouldn't worry too much about
it.
--
Cheers!

Gordon Bentley-Mix
Word MVP

Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top