+ Reply to Thread
Results 1 to 8 of 8

Macro to open specific Workbook

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,726

    Macro to open specific Workbook

    I have a macro that prompts a user to open a file and then it copies the data

    I need the code amended to select a specific workbook "Sales Data by Branch.xlsm"

    Please Login or Register  to view this content.

    See full code

    Please Login or Register  to view this content.

    It would be appreciated if someone could assist

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Macro to open specific Workbook

    Why not just Workbooks.Open if you know the name and path of file?
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Macro to open specific Workbook

    Try below code ...
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  4. #4
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,726

    Re: Macro to open specific Workbook

    I tried using

    Please Login or Register  to view this content.

    I get a run time error "object doesn't this property or method


    Kindly amend


    Thanks


    Howerd

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Macro to open specific Workbook

    Nope...As per post 3

  6. #6
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,726

    Re: Macro to open specific Workbook

    Many Thanks for the help nankw83

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,726

    Re: Macro to open specific Workbook

    My apologies Sintek, I overlooked Post # 3

  8. #8
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Macro to open specific Workbook

    Glad to help & thanks for the added Rep.

+ 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. [SOLVED] Open specific workbook and run a macro within
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2018, 09:43 AM
  2. Macro to close and re-open a workbook at specific time
    By hasanqz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2015, 03:38 PM
  3. macro to open files and copy specific sheet into new workbook (have open files part)
    By dangerdavedsp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2015, 02:23 PM
  4. Run Macro Automatically When I open a specific workbook
    By trent.bourne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2013, 12:28 AM
  5. [SOLVED] Run Macro Automatically When I open a specific workbook
    By trent.bourne in forum Excel General
    Replies: 1
    Last Post: 11-29-2013, 11:45 PM
  6. Macro to exit all workbook leaving one specific workbook open
    By Khanzaki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-22-2013, 05:09 AM
  7. Macro that promps user to open a specific workbook
    By ExcelHelpBen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2012, 07:19 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