admin管理员组

文章数量:1312658

I am having issues with a code that has worked for months on my computer, and still is working on my coworkers computers.

When I try to run it I get a pop up message saying: Wrong number of arguments (Error 450)

And then it is directing me to format(myDate, "ww") with "format" highlighted.

Anyone that can come with any tips on how to search what has gone wrong on my computer..

Thanks a lot.

I am having issues with a code that has worked for months on my computer, and still is working on my coworkers computers.

When I try to run it I get a pop up message saying: Wrong number of arguments (Error 450)

And then it is directing me to format(myDate, "ww") with "format" highlighted.

Anyone that can come with any tips on how to search what has gone wrong on my computer..

Thanks a lot.

Share Improve this question asked Jan 31 at 14:58 AkireAkire 1693 silver badges14 bronze badges 4
  • 1 If you type ?Format(Date, "ww") in the Immediate window does it throw the error or return the current week number? Do you have any missing references in Tools ~ References? – Darren Bartrup-Cook Commented Jan 31 at 15:06
  • 3 You may have created a procedure and 'accidentally' named it format. Locate and rename it. If format persists in being lowercase, declare a variable e.g. Dim Format As Long and then delete the line. – VBasic2008 Commented Jan 31 at 15:11
  • Adding it in the immediate window does throw the error code as well, I guess I would have to go trough all the codes I already ahve written and if that does not work.. Dim it and try... – Akire Commented Jan 31 at 15:20
  • 1 And thanks, I absolutely had created another sub named format... – Akire Commented Jan 31 at 15:21
Add a comment  | 

1 Answer 1

Reset to default 0

Yes, I had created a new sub called format.. so.. that was an embarasing one.. but maybe someone else can learn from it..

本文标签: