+ Reply to Thread
Results 1 to 15 of 15

Excel 32 bit code not working in Excel 64bit?

  1. #1
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Excel 32 bit code not working in Excel 64bit?

    This line works in Excel 2010, but will not work on my work laptop running Excel 2013! It works up to/including "documents", then when I add the rest it errors. Any help appreciated!
    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel 32 bit code not working in Excel 64bit?

    Please Login or Register  to view this content.
    what does this give you on 2013 machine?
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    The path C:\Users\Computername

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel 32 bit code not working in Excel 64bit?

    what is the exact error message?

    cant find any fault in the line of code you have given
    Last edited by humdingaling; 09-07-2016 at 10:39 PM.

  5. #5
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by humdingaling View Post
    what is the exact error message?

    cant find any fault in the line of code you have given
    Run time Error '1004'. Document not saved. The document may be open or an error may have been encountered when saving.

  6. #6
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,271

    Re: Excel 32 bit code not working in Excel 64bit?

    does that folder exist on your 2013 machine?
    Try saving it somewhere else.

  7. #7
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by scottiex View Post
    does that folder exist on your 2013 machine?
    Try saving it somewhere else.
    Yes it does and yes, I have tried other folders, although it did work once after I changed folder names but would not work the second time.

  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: Excel 32 bit code not working in Excel 64bit?

    Hi,

    Does that pdf file already exist when you run the code?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  9. #9
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by xlnitwit View Post
    Hi,

    Does that pdf file already exist when you run the code?
    No, but if it did save it like the 32bit version does, it will just overwrite it for now.

  10. #10
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    It's the date reference I think! As part of the filename I reference two cells, one is a cell with the formula "=today(), in Excel 2010 32bit, it displays in vba as 09-10-2016 which is fine as a filename, but in Excel 2013 64bit, it displays the date as 09/10/2016 which it does not allow as a filename.

    How do I get Excel 2013 to display the date that is an acceptable filename? I have changed the format of the cell, but in vba it still shows it with the "/"!

  11. #11
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: Excel 32 bit code not working in Excel 64bit?

    I can't tell by your description of your dates which way around the months and days are (or even which cell contains the date) but for an example try something like...

    Please Login or Register  to view this content.
    Last edited by WasWodge; 09-10-2016 at 12:15 PM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  12. #12
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by WasWodge View Post
    I can't tell by your description of your dates which way around the months and days are (or even which cell contains the date) but for an example try something like...

    Please Login or Register  to view this content.
    Yahoo! Thanks WasWodge for the answer to the problem!

  13. #13
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by thecdnmole View Post
    It's the date reference I think! As part of the filename I reference two cells, one is a cell with the formula "=today(), in Excel 2010 32bit, it displays in vba as 09-10-2016 which is fine as a filename, but in Excel 2013 64bit, it displays the date as 09/10/2016 which it does not allow as a filename.

    How do I get Excel 2013 to display the date that is an acceptable filename? I have changed the format of the cell, but in vba it still shows it with the "/"!
    this is more to do with your default display of dates than 32bit vs 64bit

    windows>control panel>region and language settings>short date

  14. #14
    Forum Contributor
    Join Date
    08-22-2009
    Location
    Manitoba
    MS-Off Ver
    Office 2010
    Posts
    509

    Re: Excel 32 bit code not working in Excel 64bit?

    Quote Originally Posted by humdingaling View Post
    this is more to do with your default display of dates than 32bit vs 64bit

    windows>control panel>region and language settings>short date
    I wondered if it had something to do with settings! I looked in Excel, but didn't think of the regional settings in Windows as it's been a long time since I went into that. That did the trick! Thanks for the help too, humdingaling!

  15. #15
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: Excel 32 bit code not working in Excel 64bit?

    Personally I have my Regional settings as dd/mm/yyyy and prefer them that way.

    Because of this, in my case I wouldn't change them just to have a legitimate file name to save in Excel, so I use a similar solution to what I posted in post #11.

    Like I stated though that is only my personal preference.

+ 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. 32 V. 64BIT excel
    By Cheecochongo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-20-2016, 09:07 PM
  2. Excel files crashing when upgrading to 64bit Excel
    By aciccarelli in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-25-2015, 04:24 PM
  3. How to read custom props on closed file (64bit Win Server, 64bit Excel)
    By soundneedle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2015, 01:25 AM
  4. Change registry settings for IE 64bit in 64bit environment
    By dgdgdg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2014, 07:56 AM
  5. Replies: 3
    Last Post: 11-23-2012, 01:57 AM
  6. [SOLVED] Vba not working in 64bit excel - Please help
    By sthiru in forum Excel General
    Replies: 1
    Last Post: 09-20-2012, 10:53 AM
  7. Replies: 0
    Last Post: 04-12-2012, 05:04 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