Date Format

G

grahammal

I have generated a UserForm and on the form are several TextBoxes.
Part of the function of the UserForm is to copy the contents of a cell
into 1 of the TextBoxes.
The contents of the cell is the date which in the cell is in the
01/11/06 format.
Problem is that when it copies it into the TextBox it ends up in a
11/01/06 format.
How do I change the format of the TextBox??
 
D

davesexcel

I tried to get it do do what you say, but can't
Are you using Control Source in the textbox properties to get the
source?
 
G

grahammal

I'm not using the ControlSource in Properties, can you tell me how?
What I am doing is:-
1) On the UserForm which I have made I enter a row number.
2) The program then inserts data read from that row into TextBoxes on
my UserForm.
3) Part of that read data is a Start date & an End date.
4) The start date is read from cell "BY" & the row and enters that into
TextBox15.
The end date is read from cell "CG" and the row and is entered into
TextBox18.
ie Start date in row 36 shows as 30/01/2006 but ends up in the TextBox
as 1/30/06.
How do I control this??
 
D

davesexcel

He,
What I would do is click on the textbox and then go to the propertie
windows, scroll down to control source and enter the cell address
whatever is in that cell will show up in the TextBo
 
G

grahammal

I understand where your coming from but although the Column is always
the same, the row is variable. How do I put a variable row into
ControlSource?
 
D

davesexcel

grahammal said:
I'm not using the ControlSource in Properties, can you tell me how?
What I am doing is:-
1) On the UserForm which I have made I enter a row number.
2) The program then inserts data read from that row into TextBoxes on
my UserForm.
3) Part of that read data is a Start date & an End date.
4) The start date is read from cell "BY" & the row and enters that into
TextBox15.
The end date is read from cell "CG" and the row and is entered into
TextBox18.
ie Start date in row 36 shows as 30/01/2006 but ends up in the TextBox
as 1/30/06.
How do I control this??
What's your code that inserts the date into the textbox?
 

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