Excel 2010 How do I Pull a Worksheet Cell Comment into a Userform Label

jhedges

Board Regular
Joined
May 27, 2009
Messages
208
I'm using Excel 2010, Windows 7 64b and I'm trying to pull a worksheet cell comment(cell has the red comment indicator), into my userform via vlookup based on a combobox change. The code I have so far, which is working to pull over other data, just not the comment, is below. The cell comment is in column 17...Is it possible to pull a cell comment into a userform?

Code:
Private Sub cbCR_Change()
    On Error Resume Next
        x = Application.WorksheetFunction. _
        VLookup(Val(cbCR), Worksheets("CSI Change Requests").Range("dbase"), 6, False)
        If Err.Number = 0 Then
        lblStaff.Caption = x
        lblSite.Caption = Application.WorksheetFunction. _
            VLookup(Val(cbCR), Worksheets("CSI Change Requests").Range("dbase"), 5, False)
        lblProgram.Caption = Application.WorksheetFunction. _
            VLookup(Val(cbCR), Worksheets("CSI Change Requests").Range("dbase"), 15, False)
        lblSubProgram.Caption = Application.WorksheetFunction. _
            VLookup(Val(cbCR), Worksheets("CSI Change Requests").Range("dbase"), 16, False)
        lblRequest.Caption = Application.WorksheetFunction. _
            VLookup(Val(cbCR), Worksheets("CSI Change Requests").Range("dbase"), 17, False)
        'Else
            'Label3.Caption = "No such product found"
        On Error Resume Next
       End If
    On Error GoTo 0
End Sub
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,216,087
Messages
6,128,740
Members
449,466
Latest member
Peter Juhnke

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