473,508 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dates in Access VBA into Excel

9 New Member
Hi all, Im running the following command from an access vba module

Expand|Select|Wrap|Line Numbers
  1. xlbook.worksheets(tblName(count, 2)).Range("A1").Value = Format(Now(), "DD/MM/YY")
Unfortunatly when the spreadsheet is opened the date is in the wrong format, it is in MM/DD/YY. I have tried sending the date across inv ariopus different guises, even as just a text string but it still converts round even if i set the date formate of the destination cell. Can someone please advise me as to why this is happening, there are various functions on the spreadsheet that require this date in the correcty format.
Oct 1 '07 #1
3 1053
Scott Price
1,384 Recognized Expert Top Contributor
First thing to do is check the regional date/time settings in your Windows Control panel. They need to conform exactly to what you want to happen also.

Regards,
Scott
Oct 1 '07 #2
WazzaRoberts
9 New Member
Its alright, twas myfault, i had some code on the excel sheet which also tried to set the date once change working fine.

I apologise schoolbiy error on my behalf
Oct 1 '07 #3
Scott Price
1,384 Recognized Expert Top Contributor
Its alright, twas myfault, i had some code on the excel sheet which also tried to set the date once change working fine.

I apologise schoolbiy error on my behalf
Not a problem! Thanks for posting back with what went wrong :-) And as I've said before, programming gives every one of us plenty of opportunity to look like grade-A chumps from time to time :-)

Regards,
Scott
Oct 1 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2292
by: BlackFireNova | last post by:
I have an Access 2003 mdb which contains software records. I need to sort on a particular type of software, and then identify and count how many copies there are per each group of that type...
1
2120
by: Alicia | last post by:
I basically wanted something that would do a count of the dates, then group them by their week name.. BEFORE: Resource Date Total number of times that date Appeared (Count) 4/3/03 ...
8
3111
by: MacDermott | last post by:
I have a query, which gathers up information, which is subsequently dumped into an instance of Excel using recordsetcopy. For one of the query fields, I have written what should be a pretty...
4
1935
by: Dixie | last post by:
I have a spreadsheet that uses VBA code in Access to save itself as a text file. The line is as follows. xl.ActiveSheet.SaveAs CurrentProject.Path & "\Reports\" & DLookup("", "tblButtons",...
18
6612
by: PC Datasheet | last post by:
An Access user saw my name in a newsgroup and sent me a request for help on a project. As part of the project, a list of the dates in a month was needed. For anyone needing a list of dates in a...
2
2867
by: sherifffruitfly | last post by:
Hi, I'm using an adaptation of excel-reading code that's all over the internet - I don't much like or understand it, but it has worked for me in the past.... beggars can't be choosers... : ...
5
2105
by: Dave | last post by:
Hello, I have a possible problem exporting a text field that happens to contain dates (but is not a date field) when using TransferText in MS Access 2000. I am exporting a query to a text...
3
2095
by: myemail.an | last post by:
If I need to format how the content of a field is displayed, I can click ALT + ENTER from design view, and specify the format, for example, the number of decimal digits and so on. Is there a way...
3
1769
by: DThreadgill | last post by:
I'm trying to import data from Excel into an Access table using VBA. I can't do the Import file because the dates on the spreadsheet are convaluted. Hence, my dilemma. When viewing the spreadsheet,...
1
2195
by: Dale | last post by:
Access 2003 I am trying to figure out how to develop a report that will display students in 1st column, dates across the top, and "P" or "A" for the data. I have a crosstab that displays what I...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.