+ Reply to Thread
Results 1 to 10 of 10

Problem with Workbooks.Open("Path) on Excel 2016 for Mac

  1. #1
    Registered User
    Join Date
    05-09-2018
    Location
    Marrakech, Morocco
    MS-Off Ver
    2016
    Posts
    5

    Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Hey Everyone,

    I'm new here and looking for some help,

    I find difficulties opening a workbook using its path, the idea is to open it , and copy the data into the main workbook that contains the VBA code to process this data.

    Any help ?

    Thank you so much !

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Hi and welcome to the forum.

    What code are you using? Better still upload the workbook that contains the macro.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-09-2018
    Location
    Marrakech, Morocco
    MS-Off Ver
    2016
    Posts
    5

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Hi Richard,

    Thank you for your quick response !!

    I am for now just testing, my workbook is still empty, the first step is copying the data from an initial workbook, since it will be variable.

    The code is :
    HTML Code: 
    I am actually working a dashboard so i need to copy the new month's data each time into a hidden sheet and apply my macros on it (Mainly generating graphs etc), do you think this is a good idea ?
    Last edited by hichaml; 05-09-2018 at 05:18 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    It's often not abolutely necessary to copy data from one workbook to another since you can link or connect directly.

    But what code are you using in the testing? Or are you saying you're trying to do it manually and having problems?

    Have you tried recording a macro which is often a good starting point, and then editing and generalising the code once you have the basics.

  5. #5
    Registered User
    Join Date
    05-09-2018
    Location
    Marrakech, Morocco
    MS-Off Ver
    2016
    Posts
    5

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Indeed i am just testing manually for now to see if everything is okay,
    When i record a macro, it does not detect the second file i copy the data from.

    The code i am using is the following :

    HTML Code: 
    I get the error : Run-Time error '1004'

    I just tried it on a windows machine and it did open the workbook data1.xls.

    How can i link directly the data from the workbook to use it in my dashboard ?

    Thanks !

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

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    have you saved your file with the macro in the folder you want to be used as 'thisworkbook.path'?
    I don't have a mac but that is the error i get if i just paste it in a workbook without saving it.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  7. #7
    Registered User
    Join Date
    05-09-2018
    Location
    Marrakech, Morocco
    MS-Off Ver
    2016
    Posts
    5

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Yes i have, but nothing unfortunately ...

  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: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Why is there a space after the xls? Also, are you using 2016 on the Mac too?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  9. #9
    Registered User
    Join Date
    05-09-2018
    Location
    Marrakech, Morocco
    MS-Off Ver
    2016
    Posts
    5

    Re: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    I tried without the space, nothing

    Yes i am using Excel 2016 on Mac

  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: Problem with Workbooks.Open("Path) on Excel 2016 for Mac

    Does
    Please Login or Register  to view this content.
    return what you expect to see? It is possible, I suppose, that you are running into a sandboxing problem.

+ 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: 6
    Last Post: 09-01-2017, 12:36 AM
  2. Workbooks collection only returns one open workbook in Excel 2016
    By myfathersson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-18-2017, 03:32 PM
  3. Open 2 workbooks in Excel 2016 cannot click controls or enter cells
    By Jason_Chan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-27-2017, 12:03 PM
  4. [SOLVED] Problem of "Workbooks.Open"
    By dhlao in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-20-2012, 07:47 AM
  5. [SOLVED] Macro to get worksheets to save to new workbook with OPEN workbooks .PATH & " " as name.
    By NicksDad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2012, 08:07 PM
  6. Workbooks("").Close Crashes Excel With Mutiple Workbooks Open
    By exs120 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-27-2011, 03:24 PM
  7. Excel 2007 unable to "see" other open workbooks
    By ssu95bm in forum Excel General
    Replies: 9
    Last Post: 09-23-2011, 09:19 AM

Tags for this Thread

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