+ Reply to Thread
Results 1 to 16 of 16

query - how to know which is the difference between a code for 64 bytes or 32 bytes

  1. #1
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi guys,

    I started to do VBA programming and it seems that I have to learn about how to fix different issues due to the different Windows platforms eg. 64 bytes or 32 bytes.

    Is there a manual where I can learn how to fix the issues?

    I did a code that works fine for me, but not for others.

    Also the hardware might impact a VBA code?

    if you can help, I would really appreciate it.

    Thanks in advance,
    Ionut
    Last edited by IonutC; 06-29-2016 at 04:42 AM.
    Please consider:
    Be polite. Thank those who have helped you.
    Click the star icon in the lower left part of the contributor's post and add Reputation. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: query

    Moderation removed.
    Last edited by Winon; 06-29-2016 at 04:45 AM. Reason: Changed Thread Title
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi Winon,

    Sorry! That was not my intention here.

    I changed the title.

    10x,
    Ionut

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi Ionut,

    The majority of code should run on either 32 or 64 bit Office with no problems. You will need to change any API code you use: https://msdn.microsoft.com/en-us/lib...ffice.14).aspx

    Also any controls that are not from the MSForms library are unlikely to be compatible with 64 bit Office.

  5. #5
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi man,

    Thank you. Then why a macro runs perfectly on my machine and on my colleagues not?
    All the notebooks are on 64 bytes.
    Last edited by IonutC; 06-29-2016 at 06:59 AM.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    That's a fairly vague question! What is the macro, and what happens on the other machine?

    And just so there is no confusion: the differences apply only when Office is 64 bit, not if you are using 32 bit Excel on 64 bit Windows.

  7. #7
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi xlnitwit,

    the post I had was: http://www.excelforum.com/excel-prog...acro-code.html

    I taught that by having a different version of windows there are issues in the logic of macro.

    Thank you,
    Ionut

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    I do not see any parts of that code that would be affected by Windows being 64 bit. If you have access to one of your colleague's laptops, it would be worthwhile stepping through the code to see what is happening.

  9. #9
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    I did. Nothing happened. The code ran and the docx files were not saved....And all were docx files.

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    You need to step the code rather than running it. I would also suggest you should specify a path for the save (using file.path instead of file.name would be a good start) rather than relying on whatever the current directory may be.

    I take it that code is in Word?

  11. #11
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    yes please! if you can show me how can I improve it, I would owe you a lot!

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    I did that in my previous post - use file.path instead of file.name. That way the pdf will be in the same folder as the original. If you want to specify a folder instead you can do that too. You already have code that allows the user to choose a folder so that would be a third option.

  13. #13
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi,

    I did this code, but is not working.

    Please Login or Register  to view this content.

  14. #14
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    The path needs to be in the SaveAs2 line:

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Ok! got it! I will give it a try!

    Thank you!

  16. #16
    Forum Contributor IonutC's Avatar
    Join Date
    01-28-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    Office 2019
    Posts
    486

    Re: query - how to know which is the difference between a code for 64 bytes or 32 bytes

    Hi there,

    is not working tough and they have a 32 bytes notebooks. I tend to think that the issue is due to this Office for 32 bytes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 03-22-2016, 05:14 PM
  2. Understanding Query Design with respect to building an Append Query
    By swade730 in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2016, 01:00 PM
  3. Replies: 1
    Last Post: 09-08-2015, 08:12 PM
  4. Replies: 2
    Last Post: 02-01-2013, 04:21 PM
  5. [SOLVED] Loop through list, perform web query and save each query on its own page
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-07-2012, 07:50 AM
  6. Problem with selecting range with in query table after query refresh
    By shooter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-31-2012, 11:55 AM
  7. Web Query - Change a word in query to form a new query
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2011, 04:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1