Results 1 to 5 of 5

Access worksheet with the same name as cell value

Threaded View

  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:

    Sub Fill_1()
        Range("AE87").Copy
        Workbooks("Purchase Orders - New.xls.xlsx").Activate
        Worksheets("Autofill Information").Select
        Range("C3").PasteSpecial xlPasteValuesAndNumberFormats
        Worksheets(Range("C3").Value).Activate
        MsgBox ("Fill 1 continues")
    End Sub
    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.

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. [SOLVED] How do I access worksheet cell data (i.e. cell sheet1!a4) from vi.
    By [email protected] in forum Excel Programming / VBA / Macros
    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