Consulting

Results 1 to 2 of 2

Thread: List select and copy sheet from another location

  1. #1

    List select and copy sheet from another location

    TestInputForm1 is a xlsm that contains (2) things.
    1) TAB1: A Name Manager that contains a list from 0-5
    2) TAB2: A data validation on cell c16 that allows the user to choose between the numbers 0-5.

    IF the user chooses the number "1" then I want the first of 5 forms to copy/paste below TAB2, CELL c16

    Thats it! Seems simple enough but my code isn't working.

    The user opens TestInputForm1

    The filed to be copied below TAB2, CELL c16 of TestInputForm1 is
    c:\RENEELY\TEST ENVIRONMENT\1_TESTtime_tracker_strawman.xlsm

    The code that I am using that is not working is listed below. thanks for your help!!
    Sub CopyWorksheet()
    Dim ("c:\RENEELY\TEST ENVIRONMENT\1_TESTtime_tracker_strawman.xlsm") As Workbook
    Set ("c:\RENEELY\TEST ENVIRONMENT\1_TESTtime_tracker_strawman = Workbooks("ProjectForm1")
    If Range(“c16”).Value = “1” Then
    Copy "ProjectForm1"
    below = TestInputForm1
    End Sub

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can you post a sample workbook. Use Go Advanced/Manage Attachments
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •