ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date Format (https://www.excelbanter.com/excel-discussion-misc-queries/79787-date-format.html)

grahammal

Date Format
 

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??


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=526696


davesexcel

Date Format
 

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?


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=526696


grahammal

Date Format
 

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??


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=526696


davesexcel

Date Format
 

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


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=526696


grahammal

Date Format
 

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?


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=526696


davesexcel

Date Format
 

grahammal Wrote:
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?


--
davesexcel
------------------------------------------------------------------------
davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708
View this thread: http://www.excelforum.com/showthread...hreadid=526696



All times are GMT +1. The time now is 05:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com