+ Reply to Thread
Results 1 to 5 of 5

Access worksheet with the same name as cell value

  1. #1
    Registered User
    Join Date
    05-24-2017
    Location
    Ipswich, England
    MS-Off Ver
    2016
    Posts
    2

    Access worksheet with the same name as cell value

    Hi all

    I am trying to use the following code but am getting an error and cannot see where I am going wrong:

    Please Login or Register  to view this content.
    The code copies a cell and activates a new workbook and worksheet and drops the value onto said sheet (in this case Autofill Information). This works up to this point. I then need to activate a sheet with the same name as the value of cell C3 (i.e. the copied value). I cannot see why my code won't do it, any takers???

    Thanks
    Ash
    Last edited by Fotis1991; 05-24-2017 at 10:22 AM. Reason: Pls use code tags around your codes.

  2. #2
    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: Access worksheet with the same name as cell value

    Hi,

    Your code looks basically OK as long as C3 doesn't contain a number.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    05-24-2017
    Location
    Ipswich, England
    MS-Off Ver
    2016
    Posts
    2

    Re: Access worksheet with the same name as cell value

    Winon - apologies noted

    xlnitwit - nope not a number which is what is throwing me completely....

  4. #4
    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: Access worksheet with the same name as cell value

    You didn't say what the error is. If it's a subscript out of range error, then the value in the cell is not a worksheet name.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Access worksheet with the same name as cell value

    @Fotis1991,

    Thank you!

    My welcoming the new Member to the Forum, could have remained though.

    Kind Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

+ 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 to access a cell from a different worksheet
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-30-2016, 12:18 PM
  2. Access form works with access Viewer but not full version of Access?
    By Shanyn in forum Access Tables & Databases
    Replies: 1
    Last Post: 10-22-2014, 01:14 PM
  3. [SOLVED] How can I use the input in a cell to access some other worksheet
    By targa72 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2013, 09:50 AM
  4. [SOLVED] How to access Cell value from specific worksheet in Module of Excel VBA.?
    By syparth in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2013, 03:46 AM
  5. [SOLVED] Can't access 2nd worksheet
    By SLIDE1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-05-2012, 07:50 PM
  6. Using cell content to access another worksheet in same workbook
    By ScubaBum in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-28-2006, 11:40 PM
  7. Replies: 1
    Last Post: 02-22-2005, 12:14 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