5

This question VBA Power Operator Not Working As Expected was closed with reasons given:

This question was caused by a problem that can no longer be reproduced or a simple typographical error

In fact the problem can be reproduced, it is specific to 64 bit versions of MS Office AND whilst the issue is of a typographical nature, the same typo is auto-corrected in 32 bit versions of Office.

My best guess is this behavioral difference is because: ^LongLong

13
  • The system works, answer added: stackoverflow.com/a/52360094 Thanks :-) Commented Sep 17, 2018 at 2:41
  • 2
    Of utmost relevance: Are typos always off-topic as Q&A? - this is an excellent counterexample.
    – BoltClock
    Commented Sep 17, 2018 at 4:14
  • I've closed the question since I considered it a typo, you've missed a space. However, it might've been better closed as a duplicate of Why do I need a space before the '^' operator in VBA for Excel 2013 or it will produce a compile time error "Expected list or separator", explaining why this space is required
    – Erik A
    Commented Sep 17, 2018 at 5:53
  • @ErikvonAsmuth please reconsider... this is about an anomaly with the VBA IDE - 32 bit version of which accommodates such typos, see comment by BoldClock... Commented Sep 17, 2018 at 6:07
  • @ErikvonAsmuth it is a confirmed issue: support.microsoft.com/en-gb/help/2454019/… Commented Sep 17, 2018 at 6:12
  • Also, it is NOT a duplicate of that other question because it results in compiled code, the other question is asking why compilation fails with expected list separator Commented Sep 17, 2018 at 6:15
  • Look at the answer on that question. It explains what's going on in your situation, and that it's 64-bit specific. The issue is exactly the same. You haven't shown it compiles for you, but the error message is the same, and the solution is the same. I'm still convinced it's a duplicate.
    – Erik A
    Commented Sep 17, 2018 at 6:47
  • Yours fails with expected list separator too. The VB IDE has a bit of variation in how it presents its errors. It can compile part of the project, masking compile errors if you don't manually compile
    – Erik A
    Commented Sep 17, 2018 at 6:50
  • Also, the link you've referred to explains why it's a compile error. You can't have it two ways: not a duplicate because it's not a compile error, and it's a confirmed compile error, see link. It's just the same error, with a slightly different way of presenting itself. As you can see, that link provides yet another error message, which is dependent on many factors
    – Erik A
    Commented Sep 17, 2018 at 6:57
  • Sorry @ErikvonAsmuth you are mistaken. First I did NOT ask the question, I had the same challenge. Second the code that the 64bit IDE generated DOES COMILE: Sub t(): Debug.Print 2^; 2: End Sub Commented Sep 17, 2018 at 7:00
  • @SlowLearner Obviously that compiles: you (or the IDE) have added a list separator (the ;). Duplicates are not asked by the same user, it's when a user encounters the same problem. It's meant so the answers go to a single place.The answer by QHarr would fit well under your answer, making it a duplicate.
    – Erik A
    Commented Sep 17, 2018 at 7:15
  • @ErikvonAsmuth that is the whole point the IDE added the ; - I agree that QHarr's answer and my answer amount to the same thing. But fact is the manifestation of the problem is different. I appreciate that duplication is annoying, but the question that QHarr answered did not apply to my situation... the symptoms did not align with what I was seeing; sure same root cause. Not duplicate. Anyway... I'm sure with your experience you're better informed than me so I'll leave it here... Cheers Commented Sep 17, 2018 at 7:45
  • Let us continue this discussion in chat. Commented Sep 17, 2018 at 8:04

0

You must log in to answer this question.

Browse other questions tagged .