ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date problem (https://www.excelbanter.com/excel-programming/386828-date-problem.html)

Craig Johnson

Date problem
 


I have written a VB program using inputboxes for the entry of data into
a very large spreadsheet. I have formatted the spreadsheet in all
aspects. For some reason if i now enter a date using the inputboxes e.g
12/03/2007 it shows in the spreadsheet as 03/12/2007, i have checked the
formatting of the spreadsheet and it is correct but for some reason when
i inputbox method entry it changes. In addition if i manually enter the
date into the spreadsheet no problem. COnfused!!! what am i missing???

*** Sent via Developersdex http://www.developersdex.com ***

Bob Phillips

Date problem
 
US Dates in VBA.

Try putting the textbox value into the cell via a date variable

Dim dte As Date
dte = TextBox1.Text
ActiveCell.Value = dte


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Craig Johnson" wrote in message
...


I have written a VB program using inputboxes for the entry of data into
a very large spreadsheet. I have formatted the spreadsheet in all
aspects. For some reason if i now enter a date using the inputboxes e.g
12/03/2007 it shows in the spreadsheet as 03/12/2007, i have checked the
formatting of the spreadsheet and it is correct but for some reason when
i inputbox method entry it changes. In addition if i manually enter the
date into the spreadsheet no problem. COnfused!!! what am i missing???

*** Sent via Developersdex http://www.developersdex.com ***




Craig Johnson

Date problem
 

Thanks bob trying it now


*** Sent via Developersdex http://www.developersdex.com ***

Craig Johnson

Date problem
 

it worked a treat hooray, thank you very much.

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 10:27 PM.

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