I am trying to to get it to work so that if there is a comment already in the cell then it would skip to the next macro. Here is what I am trying:
'Mgr Voids
If Range("F9").Comment.Text = True Then End
ElseIf Range("F9").Value > 50 Then
MyInput = Application.InputBox("You Must Give A Reason For The Amount Of Mgr Voids For " & Range("F6"))
ElseIf MyInput = "" Then End
ElseIf MyInput = False Then End
ActiveSheet. Unprotect ("13792468")
ActiveSheet.Range("F9").AddComment
Range("F9").Comment.Visible = False
Range("F9").Comment.Text Text:="" & Chr(10) & (MyInput) & Chr(10) & ""
ActiveSheet.Protect ("13792468")
End If
The first part (If Range("F9").Comment.Text = True Then End) obviously doesn't work because I have no clue how it supposed to be... I was just hoping to get lucky. Any help would be appreciated.
how to copy the contents of multiple comment boxes and paste in a single comment box.
The big picture is that I have a number of cells with numerical values in and text in comment boxes. I want to be able to click a button to copy the contents of the comment boxes and paste them, along with the numerical value from the cell, into a single comment box, ordered by highest to lowest value within the comment box, then delete the original cells and comments.
I am quite new to VBA but have been coping quite well so far with information of the web and analysing recorded macros.
I am building a tool that uses Pivot Tables (so I can't use track changes) and I have found cool code that will insert timestamp and username in the comment when a change occurs. But I need to modify the code to also take the old value and put it into the comment as well. Here is the code to register the change into the comment:
Is it possible to trigger a forced comment if a particular value is entered in a cell?
For instance, if the letter "F" is entered into a cell, I want the comment box is pop up, is this possible?
And lastly... is it possible to automatically group comments? for instance if a row has 6 comments, I'd like to combine all of them into a comment box on the same row.
my macro processes a lot of data and puts a comment in certain cells (several thousand of them). I would like to autosize the comments so that the text can all be read by default.
I'm using Excel 2002 and looking for a way to get rid of the red comment indicator in entirety. While I get that it's not possible there appears to be a workaround which I took off the Contextures website.
Sub RemoveIndicatorShapes()
Dim ws As Worksheet Dim shp As Shape
Set ws = ActiveSheet
For Each shp In ws.Shapes If Not shp.TopLeftCell.Comment Is Nothing Then If shp.AutoShapeType = _ msoShapeRightTriangle Then shp.Delete End If End If Next shp
I have some code that finds the appropriate string for a comment from another sheet. I then want to add the string to the appropriate range selection but am encountering an Object Variable or With Block Variable Not set on this section of
Range("C" & i).Select ActiveCell.Comment.Delete <== Here Or the Next line ActiveCell.AddComment (Commenta) ActiveCell.Comment.Shape.TextFrame.AutoSize = True
i need to have a way to link a small picture/thumbnail to a cell. so that there is a way to preveiw it. Ideally like what happens with the comments where you hover over the cell and the comment would pop up. or failing that may be a cell linking to the image.
I have Sheet1 and Sheet2, each sheet has 2 columns.
Sheet1: John 31 Joey 22 Josh 28 Jane 24
Sheet2: Joey Smith 22 Josh Morgan 27 Jane White 24 John Doe 32
Lookup Sheet1's each Column A cell on Sheet2.
For example, Sheet1 A1 is John, Sheet2 A4 is John Doe, since John Doe contains John, it's a match. Then compare Sheet1 B1 and Sheet2 B4, 31 and 32 don't match. This is what i need to find, then add a comment "Inconsistent" in a new column.
For example, Joey (Sheet1 A2) and Joey Smith (Sheet 1 A1) have same value 22 (Sheet1 B2 and Sheet2 B1). Then no need to add any comment.
This is a repost, I would like to add a comment boxe in multiple sheets (same cell) in a work book. Someone reccomended a macro but then my post was removed.
make the contents of the cell comment box dependent on the cell contents? eg if the cell contents = 2 and a seperate table says 2 is "poor" can it automatically populate the comment with "poor" ?
I'm wondering if it's possible to use a lookup formula to populate cell comments? In other words, I'd like to put a lookup table into a cell, and if the value is not FALSE, have that Lookup table then pull in certain information into the cell's comments.
I have created vba which I want to comment out. I totally stumped how to create this action on vba. My current vba code which I want to comment out using vba
Code: Option Explicit Sub YearlyInput() End Sub 'Speeding Up VBA Code With Application
I have this code tat I am using to important a picture via a comment box:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$AI$10" Then newpic = "J:help" & Range("AQ21").Value Target.Comment.Shape.Fill.UserPicture newpic End If End Sub
The problem is if you put a value in AI10 that is not AQ21 it gives and error. I would like for it to call another cell (B3) for newpic in the case of a value that is not present in AI10.
Is there a way to insert a pdf into a cell comment? I found how to insert an object but when I do that it covers the entire spreadsheet. I would like to be able to add pdf's to cell comments.
I am trying to write a VBA macro that will go from one sheet and copy a cell's text, then go back to the main sheet and insert this text into a "comment-box" type of thing.
The box I'm talking about is where you move the mouse over a cell and a box pops up with the comment in it.
I was toying w/ the idea of being able to view two items in the same cell. A wholesale cost and a retail cost, the wholesale would be in the cell and the retail price would be in the comment. When mouse is placed over a particular cell, a comment would pop up and show the second view, the retail price.
This to be effective would need to be copied down like a typical formula would be. If not, it would take too long to enter each item into a comment for each cell.
I really doubt this is possible, but if not in Excel, could this be accomplished in VBA?
I am using the following macro to creat comments based on the contents of certain cells. Everything works except the it resizes the Comment Boxes exponentially. The Last comment box in the range seems to be the default size, the next to last a little bigger, then it start getting even larger and larger until the first comment in the colomn.
Sub InsertComm() Dim RgPartnumb As Range Dim NRg As Range Set RgPartnumb = Range(Range("B2"), Range("B2").End(xlDown)) On Error Resume Next For Each NRg In RgPartnumb With NRg .Comment.Delete...................................
I've some code to add a comment with the value of the corresponding cell 9 columns across:
For Each rCell In rRng.Offset(0, 0).Resize(rRng.Rows.Count, rRng.Columns.Count) On Error Resume Next rCell.AddComment On Error GoTo 0 rCell.Comment.Text "Previous value was " & Cells(rCell.Offset(0, 9).Value) '(rRng.Row, rRng.Column).Value
I'm developing a little way to be able to modify comments without having to use the mouse (normally I need to right click the ActiveCell in order to choose "Show/Hide comments"). Below is 2 simple lines of code for unhiding the comment of the ActiveCell and then selecting it. What I can't figure out how to do is actually get the cursor to be inside the comment so that I can start modifying text or entering additional text.
Sub comment_unhide() ActiveCell.Comment.Visible = True ActiveCell.Comment.Shape.Select True End Sub