Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    XeviBatlle is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2025
    Posts
    6
    You can multiply two constats using the bang declaration sufix that indicates that they are long values:
    ? 4692!*283!
    1327836
    Or
    ? 4692!*283! 'Error, duplicated
    ? 4692*283!


    1327836

  2. #17
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    I do not see the difference?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #18
    XeviBatlle is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2025
    Posts
    6
    I just wanted to point out that using the bang declaration sufix does not produce overflow error. The two expressions are equivalent.
    Ahhh, I just noticed. The second instruction should only have the bang operator on one of the numbers. Fixed! Sorry

  4. #19
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,574
    Yes, one can get by with just one of the values being Long.
    However for consistency, I would probably make all Long. For my sanity at least, as in a few months, I will have forgotten this.

    Does not appear to work for variables though?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #20
    XeviBatlle is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2025
    Posts
    6
    No, you can't add the bang sufix to variables in the inmediate window, but you can use:

    A=4692!: B=365! : ? A*B
    1712580

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Modules and Object Overload
    By drexasaurus in forum Programming
    Replies: 4
    Last Post: 05-23-2014, 11:14 AM
  2. Object variable or With block variable not set
    By walter189 in forum Programming
    Replies: 1
    Last Post: 07-28-2011, 08:51 AM
  3. Long Variable syntax
    By eww in forum Programming
    Replies: 5
    Last Post: 02-10-2011, 03:34 PM
  4. Replies: 4
    Last Post: 08-05-2010, 01:26 PM
  5. Refering to variable form names inside a variable
    By redpetfran in forum Programming
    Replies: 2
    Last Post: 05-21-2010, 01:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums