Is there a way to retrieve the cell address of a comment in Excel?

AdamDynamic

I am writing a short macro to manipulate some comments in Excel. It would be useful to have a way to find out the cell address/location of a comment in my active worksheet - is there any way to do this with the comment object in Excel? Or failing that, any clever workaround that would give me the same result?

Some illustrative pseudo-code of what I'm trying to achieve:

dim wb as Workbook
dim ws as worksheet
dim cmt as Comment

set wb = ActiveWorkbook

for each ws in wb.sheets
    for each cmt in ws.comments
        debug.print cmt.address ' Pseudo code
    next cmt
next ws
html_programmer

Try:

Dim wb As Workbook
Dim ws As Worksheet
Dim cmt As Comment

Set wb = ActiveWorkbook

For Each ws In wb.Sheets
    For Each cmt In ws.Comments
        'Debug.Print cmt.Address ' Pseudo code
        Debug.Print cmt.Parent.Address
    Next cmt
Next ws

For info: .parent returns the parent object of the comment object, which in this case would be the cell.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Excel macro cell address increase

From Dev

Retrieve cell value based on date Excel

From Dev

Retrieve rows by specific value of the cell in Excel

From Dev

Relative Cell Address needed in Excel VBA

From Dev

Read excel using npoi cell range address

From Dev

Read excel using npoi cell range address

From Dev

How do I retrieve the text of a cell comment

From Dev

Excel VBA - Use value in cell as address to target another cell

From Dev

Excel adding a comment onto a cell

From Dev

Extracting multiple email address from excel cell /excel file

From Dev

Is there an easy way to change cell references in Excel VBA?

From Dev

Excel Pivot Table - How to retrieve value of cell in Rows section

From Dev

If the cell has a number then return the cell next to it in a sorted way - Excel

From Dev

Results address of empty cell in Excel sheet using XSSF

From Dev

excel vba getting the row,cell value from selection.address

From Dev

Chart Series name referencing cell address Excel 2010 VBA

From Dev

Qt ActiveX QAxObject format Excel cell comment

From Dev

excel vba insert comment on cell with keyword

From Dev

Qt ActiveX QAxObject format Excel cell comment

From Dev

Add a text comment in a numeric cell with Excel

From Dev

Excel-VBA macro to transform cell content into a comment of another cell

From Dev

Is it possible in some way to convert IPV6 address to IPV4 address or else retrieve the IPV4 address always?

From Dev

Is there a way to add tooltip to excel cell data in c#

From Dev

Hide Rows when cell is empty excel (faster way)

From Dev

Any way to convert excel cell value in to html format?

From Dev

Is there a way to randomly select a cell based on weighted probability in Excel?

From Dev

Excel VBA: Way to find the value of a cell with multiple criteria

From Dev

Elegant way of deleting a (the row of the) cell that contains "xxx" in Excel VBA

From Dev

Hide Rows when cell is empty excel (faster way)

Related Related

  1. 1

    Excel macro cell address increase

  2. 2

    Retrieve cell value based on date Excel

  3. 3

    Retrieve rows by specific value of the cell in Excel

  4. 4

    Relative Cell Address needed in Excel VBA

  5. 5

    Read excel using npoi cell range address

  6. 6

    Read excel using npoi cell range address

  7. 7

    How do I retrieve the text of a cell comment

  8. 8

    Excel VBA - Use value in cell as address to target another cell

  9. 9

    Excel adding a comment onto a cell

  10. 10

    Extracting multiple email address from excel cell /excel file

  11. 11

    Is there an easy way to change cell references in Excel VBA?

  12. 12

    Excel Pivot Table - How to retrieve value of cell in Rows section

  13. 13

    If the cell has a number then return the cell next to it in a sorted way - Excel

  14. 14

    Results address of empty cell in Excel sheet using XSSF

  15. 15

    excel vba getting the row,cell value from selection.address

  16. 16

    Chart Series name referencing cell address Excel 2010 VBA

  17. 17

    Qt ActiveX QAxObject format Excel cell comment

  18. 18

    excel vba insert comment on cell with keyword

  19. 19

    Qt ActiveX QAxObject format Excel cell comment

  20. 20

    Add a text comment in a numeric cell with Excel

  21. 21

    Excel-VBA macro to transform cell content into a comment of another cell

  22. 22

    Is it possible in some way to convert IPV6 address to IPV4 address or else retrieve the IPV4 address always?

  23. 23

    Is there a way to add tooltip to excel cell data in c#

  24. 24

    Hide Rows when cell is empty excel (faster way)

  25. 25

    Any way to convert excel cell value in to html format?

  26. 26

    Is there a way to randomly select a cell based on weighted probability in Excel?

  27. 27

    Excel VBA: Way to find the value of a cell with multiple criteria

  28. 28

    Elegant way of deleting a (the row of the) cell that contains "xxx" in Excel VBA

  29. 29

    Hide Rows when cell is empty excel (faster way)

HotTag

Archive