Posts by royUK

    Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the URL from the address bar in your browser) to the cross-post. We are here to help so help us help you!




    Read this to understand why we ask you to do this



    Excelguru Help Site - A message to forum cross posters

    I don't think that code that errors is mine. It looks like you are working with a Table so you don't need to be using any code to find the row to post to.


    Where's the original question? Does it have an example workbook?


    Also, if your workbook is so big it might be a problem. What is the actual size of it?

    It's poor workbook design to have data separated on different sheets.


    Your code will only work on the ActiveSheet and on the specified range, if a Table already exists there you will get that error message.


    You need to loop through the sheets check if a Table exists and create the Table if not.


    Welcome to the Forum. Please read the Forum Rules to understand how the Forum works and why I have added Code Tags to your post


    All VBA code posted in the forum must be wrapped in code tags, which you omitted, including single-line code snippets.Be sure to use them in future posts.


    How to use code tags


    Just highlight all of the code and press the <> in the post menu above button to add the code tags.


    Also, please start your own post. Posting in another member's Thread is known as hijacking and is not allowed here. By all means add a link to a Thread that may be related to your question.

    Try this



    Add the date into a cell comment like this


    Code
    Sub DateModified()
        On Error Resume Next
        With ActiveCell
            .ClearComments
            On Error GoTo 0
            .AddComment
            .Comment.Text Text:="Modified on: " & Format(Date, "long date")
            .Comment.Visible = False
        End With
    End Sub

    If you want it to be automatic then you could use a worksheet event


    If you aren't sure how to use event code then read this


    Where to put the code

    You need to check if the sheet name exists before running the code.


    Why would you want to copy the activesheet, it might not be the correct one? I would have hidden template sheet to copy.


    Don't use an error handler until you know the code is working correctly.


    Your error handler is all wrong and will run whether an error occurs or not.