+ Reply to Thread
Results 1 to 3 of 3

On cell change copy and append to bottom of table

  1. #1
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    On cell change copy and append to bottom of table

    Hi all,
    For the life of me I can't work out why the below code isn't working. Is there something obvious I am missing? Does it need to be phrased differently for change objects?
    It's getting stuck @ line 8 ' Range("Uncertainty_Components[[#Headers],[Uncertainty Source]]").Select'
    Please help!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: On cell change copy and append to bottom of table

    Hey Diva,

    VBA is a picky language. It doesn't know what you mean by your line 8. You also might have some confusion on which sheet (or workbook) the range is in.

    1. Try to name your range using the names manager and use it in line 8. The name you have is specific to a defined table and might not work on older versions of Excel. Also, I've never seen the "[[..]]" construct before.
    2. You've Selected a sheet and hope the range on line 8 deals with that range. Try to Activate that sheet to insure it is the active and current sheet.
    3. It just occurred to me that code behind one sheet might not work on a second sheet. This had to do with "Scope" of VBA. If you want code to work on two different sheets, you need to move it to a module that can see both.

    http://www.cpearson.com/excel/Scope.aspx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    10-09-2012
    Location
    Adelaide, South Australia
    MS-Off Ver
    Excel 2010
    Posts
    135

    Re: On cell change copy and append to bottom of table

    Hi Marvin,
    you were absolutely correct, the code worked perfectly in another module but not inside the change module of the sheet.
    To get around this I instructed the change code to run the another macro including the code.
    Thanks

+ 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. Macro to copy rows of data in a table which contains a string and change cell value
    By teresadg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-29-2015, 11:02 PM
  2. [SOLVED] Copy All But the First Row of a Table Databody and Append to the End of Another Table
    By TheScott in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2015, 02:43 AM
  3. Help with VBA code to find bottom row in pivot table and fill table cell borders
    By Eric111 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2014, 07:15 PM
  4. Copy cells append to table
    By Dave H in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2014, 09:54 AM
  5. Append Refreshed Data to the bottom of the table
    By MissLungen in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-06-2014, 09:38 AM
  6. Append Data to Bottom When Using Combine & Merge Macro
    By wealthistime in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-21-2011, 01:50 AM
  7. Append variable range of data to the bottom of another sheet
    By crockee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2010, 09:48 AM

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