+ Reply to Thread
Results 1 to 3 of 3

Return Multiple Threaded Comments using VBA

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    18

    Return Multiple Threaded Comments using VBA

    Hi All,

    Any help on this would be great...

    I have a Change Event macro that needs to utilize threaded comments.
    I can check if there is a threaded comment and if so, return the first comment using the following:

    Please Login or Register  to view this content.
    However, I can't find how to count how many "replies" there are within the thread and loop through each "reply" to get multiple comments.

    I found a site claiming:

    Please Login or Register  to view this content.
    ...would let me know how many replies to loop through, but this results in an error and won't process.

    Any help?

    Kind regards
    Rob
    Last edited by wahbob; 08-19-2020 at 12:38 PM. Reason: Please ignore!

  2. #2
    Forum Contributor
    Join Date
    08-22-2017
    Location
    USA
    MS-Off Ver
    2016 WINDOWS and MAC
    Posts
    294

    Re: Return Multiple Threaded Comments using VBA

    It appears there is a count property.

    You could instead try looping with a For Each if you can't get the .count property to return.

    Problem is you have to dim the CommentThreaded object as its correct type most likely (is it CommentThreaded?) or maybe try dimming as generic Object. Fortunately, the programming example by Microsoft in their own documentation specifies the object type for the For Each loop... just kidding, it doesn't. I guess Option Explicit is difficult for Microsoft example programmers.
    Please Login or Register  to view this content.
    LINK: https://docs.microsoft.com/en-us/off...mmentsthreaded

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Return Multiple Threaded Comments using VBA

    Please Login or Register  to view this content.
    Code provides example of worksheet and cell level threaded comments
    Cheers
    Andy
    www.andypope.info

+ 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. wrong multi-threaded calculation
    By GregAm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2020, 07:23 PM
  2. [SOLVED] Threaded Comments
    By MarcVö in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-28-2019, 06:40 AM
  3. Checking Threaded Comments
    By mike406 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2019, 12:11 PM
  4. [SOLVED] Can we prevent Threaded View
    By Oppressed1 in forum Suggestions for Improvement
    Replies: 3
    Last Post: 07-08-2017, 10:53 AM
  5. [SOLVED] Threaded mode does not work
    By Tony Valko in forum The Water Cooler
    Replies: 20
    Last Post: 03-23-2016, 02:15 PM
  6. Threaded View in Outlook
    By omnri in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 01-02-2012, 07:39 PM
  7. [SOLVED] Threaded programming in VBA
    By Martin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2005, 05:05 PM

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