Not understanding Error for ExT.Activate

  • I copied the Command button from another spreadsheet into this spreadsheet and changed the destinations, as well as the page names to reflect the new workbook. However, I'm getting an error on the ExT.Activate line, when I try to use the macro button. Not sure why. It works perfectly on the other spreadsheet and should be doing the same on this spreadsheet.


    I did post same question here, but I couldn't upload the spreadsheet for some reason. The only thing I'd like help adding is clearing the data in the first table, columns A & B, with the same button.


    Any help is appreciated.
    Regards,
    GfCs

  • Re: Not understanding Error for ExT.Activate


    Try changing ExT to Dt on every line that has it. You will also have the same issue with MEx

  • Re: Not understanding Error for ExT.Activate


    Tried that, now it gives an error on the next line "lr = ExT.Cells(Rows.Count, 2).End(xlUp).Row + 1"

  • Re: Not understanding Error for ExT.Activate


    Try this

  • {RESOLVED} Re: Not understanding Error for ExT.Activate


    This is the code that I was able to get to work:


    What I'm trying to figure out now, is how to get the same button to clear the data (only) in table 1, columns A & B from row #2-down the entire column, on the Db worksheet.
    I've searched the web, but most the examples are for deleting rows or inserting them. The few that do talk about ClearContent, I don't understand. It transfers the data from cells on Db to "Table2" on Ct. But as stated, I can't find the correct way to get it to select columns A & B (minus the 1st row) and clear the data without deleting the rows on "Table1" on the Db sheet, which also deletes the cells that it's transferring the results from.
    I've attached the working spreadsheet to this post.
    :angrypc:


    Thanks in advance for any help.
    GfC

  • Re: Not understanding Error for ExT.Activate


    The code you're using forces the macro to override the error, I thought I'd work around using error control, but it's the same difference in the end
    The code below is the easy way to delete the contents of columns A & B on the Daily Bidding sheet


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!