+ Reply to Thread
Results 1 to 4 of 4

Open workbook based on cell value

  1. #1
    Registered User
    Join Date
    10-21-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Open workbook based on cell value

    Hi,

    I am trying to write macro that, depending on the value in a particular cell, opens a specified workbook.

    What i need is a macro that, when run,checks the value of cells in column GC. If the value is more than zero, opens the workbook specified in row GD. It should check until there is no more data.

    GC GD
    2 0 book1.xlsm
    3 1.07 book2.xlsm
    4 0 book3.xlsm
    5 3.98 book4.xlsm

    I hope that makes sense. Any help would be appreciated.

    gs.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Open workbook based on cell value

    Welcome to the forum!

    What are the 2nd column numbers?

    What path are the workbooks in, thisworkbook.path?

  3. #3
    Registered User
    Join Date
    05-12-2010
    Location
    São Paulo, Brasil
    MS-Off Ver
    Excel 2003 & Excel 2007 & Excel 2010
    Posts
    8

    Talking Re: Open workbook based on cell value

    Hello, attached is an example that will help you.

    Example.xls

    Below is the code:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-21-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Open workbook based on cell value

    Thank you very much! Works a treat!

    I can do basic macros where i can record the actions, i woiuld not have maged this without you.

    Cheers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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