Results 1 to 4 of 4

I'll pay $$. (Macro) Copy Table and paste in comment.

Threaded View

  1. #1
    Registered User
    Join Date
    09-15-2017
    Location
    PR
    MS-Off Ver
    2016
    Posts
    2

    I'll pay $$. (Macro) Copy Table and paste in comment.

    Edit: I only need a working code of a macro that copies the visible fields on a table and paste it somewhere else as a comment.

    Hi everyone,


    I have a problem trying to copy all the filtered data in a Table in one workbook and paste it as a comment in another workbook.



    Sub Comment()
    
    Dim Column as String 'this information has been set in another part of the macro
    
    '... some code not relevant to this function
    
    Dim Data as String
    
    
        Windows("RawData.xlsx").Activate
        ActiveSheet.ListObjects("Table_DCD.accdb6").Range.AutoFilter Field:=3, _
            Criteria1:="AS"
                  
        Range("Table_DCD.accdb6").Select
        Data = ActiveCell.Value
            
        Windows( _
            "Information"). _
            Activate
        Application.CutCopyMode = False
        Range(Column & "9").Select
        Selection.ClearComments
        Range(Column & "9").AddComment
        Range(Column & "9").Comment.Visible = False
        Range(Column & "9").Comment.Text Text:= _
            "Students:" & Chr(10) & Data 
    
    End Sub

    The thing is that I can't save all the table's data in a string, so I believe I have to use a multidimensional array or something like that, and honestly, I don't have that amount of knowledge yet. Also, I believe that there is a chance(not necesarily true) that filtering and then selecting the table isn't going to select the visible fields only.

    I would be really grateful if someone help me out here with this code(a brief explanation will also be useful), I'm kinda desperate. Thanks.

    Edit: I'm willing to pay a beer ($5) via paypal to whoever solve this problem first.
    Last edited by WBabilonia; 09-15-2017 at 03:23 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Copy Certain cells on a row and paste into a comment
    By markpem in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-16-2015, 06:31 AM
  2. Copy Certain cells on a row and paste into a comment
    By markpem in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2015, 10:32 AM
  3. Copy contents of multiple comment boxes and paste in a single comment box
    By xxJaRxx in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-14-2014, 12:39 PM
  4. Macro to Copy Pivot Table and Paste a Regular Data Table in the Same Position
    By webfeet2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2013, 06:34 AM
  5. Macro to copy a table and paste in another table (based on certain conditions)
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-22-2013, 01:14 PM
  6. How to paste a table into a comment
    By MalR in forum Excel General
    Replies: 3
    Last Post: 01-08-2013, 08:04 AM
  7. Macro: IF given range contains a comment box, then copy cell D1 and paste.
    By azhar.sayed in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-10-2011, 07:22 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