+ Reply to Thread
Results 1 to 3 of 3

Using a cell reference to open a specific sheet within a closed workbook

  1. #1
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Using a cell reference to open a specific sheet within a closed workbook

    Hi All!

    I haven't played with VBA for quite a while now, so please excuse me if I am a little rusty!

    What I would like to do is to open a named workbook and specific sheet with text from a cell reference.

    I have two sets of radio buttons which give various text results when checked.

    For ease of explanation set one returns small, medium and large whilst the second set returns red, green and blue

    I have three workbooks (small, medium and large) each with three sheets (red, green and blue)

    I would like to open one of three workbooks based on the output of the first set of buttons, i.e. small.xlsx, medium.xlsx or large.xlsx
    and one of three sheets based on the output of the second set of buttons

    I have used this piece of code to open the workbooks:

    Please Login or Register  to view this content.
    This works fine, but I haven't been able to open a specific sheet within the workbook.

    Any ideas?

    Thank you for your help

    Wiggy

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Using a cell reference to open a specific sheet within a closed workbook

    Please Login or Register  to view this content.
    will work the way above, but you could open it as an excel object

    Please Login or Register  to view this content.

    I havent tested this as yet.
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Re: Using a cell reference to open a specific sheet within a closed workbook

    Hi Nathan,

    Thank you for your reply,

    The call for the worksheet also needs to be derived from a cell reference, I have tried playing around with your suggestion, but with no success as of yet!

  4. #4
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Re: Using a cell reference to open a specific sheet within a closed workbook

    Hi Nathan,

    Thank you for your reply,

    The call for the worksheet also needs to be derived from a cell reference, I have tried playing around with your suggestion, but with no success as of yet!

  5. #5
    Registered User
    Join Date
    05-20-2014
    Posts
    2

    Re: Using a cell reference to open a specific sheet within a closed workbook

    Hi All,

    I am still trying to play with this problem,


    I have tried a couple of different options, but still can't get things working

    The latest code I have is:

    Please Login or Register  to view this content.
    As with the first try I made, I can open the correct workbook based on the value in cell I18 but trying to open the specific worksheet based on the value of I16 is eluding me

    Thanks for any help!

+ 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. How do I reference another workbook and open a specific sheet named in a cell
    By shabooty542362 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2013, 04:50 PM
  2. [SOLVED] Macro to open workbook and go to specific worksheet based on cell reference
    By ajmartin17 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2013, 10:44 AM
  3. Replies: 0
    Last Post: 10-11-2012, 10:48 PM
  4. [SOLVED] Copying specific rows from an open workbook into the next row of a closed workbook.
    By Deimola in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2012, 12:59 PM
  5. Replies: 0
    Last Post: 08-10-2012, 08:02 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