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