ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Form has macro issues (https://www.excelbanter.com/excel-discussion-misc-queries/122309-data-form-has-macro-issues.html)

SIR Knight

Data Form has macro issues
 

Rob,

I have had the same thing. The only way I have been able to get round
it is to specify the format in VBa as follows

eg = Format(Date,"dd-mmm-yyyy")

I have used the "mmm" as if I use a 2 digit month it may still revert
to taking it as an american format ie 09/01/2006 becomes September
anyway, but doesn't happen from 09-Jan-2006

Not sure if there are other cures

Steve


BRABUS

Data Form has macro issues
 

Hi,

I am trying to use a Data Form in XL that is opened by a simple
macro/vb script attatched to a button.

This appears to work fine until a date is entered. We are using UK
date format of DD/MM YYYY hh:mm and when we enter the record it changes
it to the American format of MM//DD/YYY hh:mm.

If I open the data form without using the button then the date is
entered correctly. I know you will say dont use the form but trust me
I need to with some of the people who enter data for me.

Any ideas please?

Rob




--
BRABUS

Dave Peterson

Data Form has macro issues
 
Some of the people who use the non-USA date formats have suggested this:

Option Explicit
Sub testme()
Application.CommandBars.FindControl(ID:=860).Execu te
End Sub



BRABUS wrote:

Hi,

I am trying to use a Data Form in XL that is opened by a simple
macro/vb script attatched to a button.

This appears to work fine until a date is entered. We are using UK
date format of DD/MM YYYY hh:mm and when we enter the record it changes
it to the American format of MM//DD/YYY hh:mm.

If I open the data form without using the button then the date is
entered correctly. I know you will say dont use the form but trust me
I need to with some of the people who enter data for me.

Any ideas please?

Rob

--
BRABUS


--

Dave Peterson


All times are GMT +1. The time now is 07:32 AM.

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