+ Reply to Thread
Results 1 to 4 of 4

To select a workbook using sheet name

  1. #1
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    To select a workbook using sheet name

    Hi All,

    Hope All XL Forum frendz are rocking as usual,


    I have a doubt, Actually I have a couple of workbook where the names of workbook will be same, but the sheet names will be different .. so is there anyways to call a sheet which is located in another worksheet?

    It would be great if help me out and it gonna save me a lot of time for me..reps sure as usual!!! Thanx buddies...
    Vipin Oceans

  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: To select a workbook using sheet name

    Hi,

    I think you may be incorrectly mixing your terminology. Workbooks contain worksheets, and no two workbooks can have the same name.

    I assume you want to reference a sheet in a second workbook from a macro in a first workbook. In which case just be sure to use a complete reference including the workbook name and sheet in question. e.g.

    Workbooks("mysecondworkbook").Sheets("mysheet").Range("A1").Copy
    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
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: To select a workbook using sheet name

    Thanks Richard for you reply, Actually the workbooks which I want to run macro is being downloaded from net, and each time when I download it from sharepoint the workbook name changes but the worksheet name name will be constant. So I was just thinking , rather calling the workbook name I can call the worksheet name to activate it as it a constant value.

    For Eg:

    wen I download fisrt time from sharepoint workbook name will be : R881(1).xls


    2 nd time it will automatically change something to : R881(2).xls or may be R881(1a).xls


    but all the time worksheet name will be same it will not change...


    so I want to run some macros and filters on the sheet which being downloaded from another master sheet.. so whenever this workbook name gets changed I have to manually change the workbook name which matches to my snippet code, Hope u got a better idea now!!!

    Thank you!!!

  4. #4
    Registered User
    Join Date
    03-22-2012
    Location
    Bangalore, IND
    MS-Off Ver
    EXCEL 2010, 2007
    Posts
    90

    Re: To select a workbook using sheet name

    can any one please help me out~!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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