Share via

Vba can't read Date?

Anonymous
2013-03-26T11:10:01+00:00

My company changed the computers two months ago, all new pc with same specification.

I posted this same thread on 1 Mar 13 and the thread went to Chinese forum. Suggestion from that forum was to check the area and language within the control panel, I did that and found that all computer were set with same area and language. I still looking for the answer to solve this problem.

I have a line Range("A26").Value = Format(Date,"dd-mm-yy") which runs well in some but not all PC.

Debug highlighted "Date".

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2013-03-26T11:26:17+00:00

The following has to be done on a computer where the error message occurs.

If the error message states that Date is an unknown function, end macro execution, and select Tools | References... in the Visual Basic Editor.

The references in use are displayed at the top of the list; their check boxes are ticked.

There may be a reference in use whose name starts with MISSING:. If so, clear its check box, then click OK.

Next, select Debug | Compile <projectname>. Hopefully, you won't get an error message about the Date function.

Was this answer helpful?

0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2013-03-29T00:42:23+00:00

    HansV,

    Thanks for you answer. Unchecked missing reference solved the problem, now the vba performs as it should be.

    Thanks again.

    I pasted the link of this thread to the chinese forum, hopefully it would help those chinese users who face the same problem as I was could get it fixed as well.

    Also thanks for the rest of input and advices, you guys are great.

    Best Regards

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Anonymous
    2013-03-26T11:47:39+00:00

    Hans

    I will try that and let you know the result.

    Tks

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2013-03-26T11:43:47+00:00

    Hi,

    On the problem pc's, try

    msgbox VBA.Date

    postback the result

    Regards

    JY

    Was this answer helpful?

    0 comments No comments