How do I add comments/description to my add-in?

Richynero

Board Regular
Joined
Jan 16, 2012
Messages
150
I have written a very nice little excel add-in which creates a report of all the errors on my workbook and then hyperlinks to them. I have assigned a hotkey to the macro and then saved the workbook as an .xla.

All works fine.

However, I want to add comments in the little comment box in the add-in screen. I thought I could just add a description to the macro but that has not worked.

Any ideas?

Thanks

PS: For anyone that is interested here is my code...

Code:
Sub FindErrorsAndListAddressAddInV7()
Application.ScreenUpdating = True
 
  Dim DivError As Integer
  Dim RefError As Integer
  Dim MyErrors As Integer
  Dim NA_Error As Integer
  Dim NameError As Integer
  Dim NumError As Integer
  Dim NullError As Integer
  Dim ValueError As Integer
  Dim i As Integer
 
  Dim ErrorCells As Range
  Dim TCell As Range
  
  Dim wsh As Worksheet
 
  i = 1
  NullError = 0
  DivError = 0
  ValueError = 0
  RefError = 0
  NameError = 0
  NumError = 0
  NA_Error = 0
 
 Set NewSheet = Sheets.Add(Type:=xlWorksheet)
NewSheet.Cells(i, 1).Value = "Error"
NewSheet.Cells(i, 2).Value = "Sheet"
NewSheet.Cells(i, 3).Value = "Cell"
 
  For Each wsh In ActiveWorkbook.Worksheets
    Set ErrorCells = Nothing
    On Error Resume Next
    Set ErrorCells = wsh.Cells.SpecialCells(xlCellTypeFormulas, xlErrors)
    On Error GoTo 0
    If ErrorCells Is Nothing Then GoTo NextWsh
    For Each TCell In ErrorCells.Cells
      Select Case TCell.Value
        Case CVErr(xlErrDiv0)
          DivError = DivError + 1
          i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrNA)
          NA_Error = NA_Error + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrName)
          NameError = NameError + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrNull)
          NullError = NullError + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrNum)
          NumError = NumError + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrRef)
          RefError = RefError + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case CVErr(xlErrValue)
          ValueError = ValueError + 1
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
        Case Else
          MsgBox "Unidentified error type"
           i = i + 1
          NewSheet.Cells(i, 1).Value = TCell.Value
          NewSheet.Cells(i, 2).Value = wsh.Name
          NewSheet.Cells(i, 3).Value = TCell.Address
      End Select
    Next TCell
NextWsh:
  Next wsh
 
 Application.ScreenUpdating = True
 
    NewSheet.Cells(1, 5).Value = "#Null! Errors: " & NullError
    NewSheet.Cells(2, 5).Value = "#DIV/0! Errors: " & DivError
    NewSheet.Cells(3, 5).Value = "#VALUE! Errors: " & ValueError
    NewSheet.Cells(4, 5).Value = "#REF! Errors: " & RefError
    NewSheet.Cells(5, 5).Value = "#NAME? Errors: " & NameError
    NewSheet.Cells(6, 5).Value = "#NUM! Errors: " & NumError
    NewSheet.Cells(7, 5).Value = "#N/A Errors: " & NA_Error
    NewSheet.Cells(9, 5).Value = "Total Errors: " & NullError + DivError _
        + ValueError + RefError + NameError + NumError + NA_Error
 
Ans = MsgBox("Would you like to build hyperlinks to error cells?", vbYesNo, "Link Builder v0.4b")
If Ans = vbYes Then
NewSheet.Range("D1").Value = "Link"
    For i = 2 To NewSheet.Range("c65536").End(xlUp).Row
        strSubAddress = "'" & Range("b" & i) & "'!" & Range("c" & i)
        strDisplayText = Range("b" & i) & Range("c" & i)
        NewSheet.Hyperlinks.Add Anchor:=Range("d" & i), Address:="", SubAddress:=strSubAddress, TextToDisplay:=strDisplayText
     Next i
      Columns("D:D").EntireColumn.AutoFit
End If
 
    Columns("B:B").EntireColumn.AutoFit
    Columns("E:E").EntireColumn.AutoFit
 
End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Thanks!

Strangely enough I had already looked at that link but failed to scroll far enough to the bottom.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top