troubleshooting Question

Editing a Comment through a UserForm

Avatar of Cook09
Cook09Flag for United States of America asked on
Microsoft ExcelMicrosoft Office
13 Comments1 Solution219 ViewsLast Modified:
Attached is a generic workbook of something that  is currently being worked on.  Some of the functionality is not there, and it's not as dynamic as the original, but I think there is enough there for someone to look at to determine what is occurring without having to write a lot of detail.  It's just a very stripped down Sandbox.

Actually, there are three or four questions that I have, but we'll address those one at a time.  Most of the questions happen in the frmHistology SheetCode.  The first two are connected with btn_Submit_click.  Specifically, it works fine until it gets to StringComment:

The first two are somewhat related.  As the UserForm is shown, the values attempt to track the information that is located on the Worksheet by IDX number.  All of that works fine, at least in the original, except I would like to have the  Cell Comments from the logged on User Class to be displayed in the appropriate ListBox2 and TextBox1 on the UserForm. These are  [nADGroup] = "User" or [nADGroup] <> "User" found in Worksheet("Database") A1.

The code works fine for grabbing the contents of the UserForm and placing it within the comment section of the appropriate cell, but how can the reverse be accomplished?

The second part involves adding additional information to a cell that already has a comment in it.  It was mentioned previously that using .....rngCmt.Comment instead of ...rngCmt.AddComment is the procedure for making that happen.  However, it now errors out when just the .Comment is used with the rngCmt.  The AddComment works fine, as long as the cell Comment is empty.  What is it about the range rngCmt that causes it to error out.

The goal is to bring the appropriate Cell Comment into the ListBox2 and TextBox1, or at the very least TextBox1, make any editing changes and then save it back to the same Cell Comment.

Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros