Insert Pic Into Comment For Every Cell That Has Text Containing String .jpg Or .png
May 10, 2009
I need a nudge in the right direction with how to amend the below code so that it :
1: cycles though all cells in a workbook, and sees whether the text reference of the cell contains a picture filename (i.e. searches for .png or .jpg in the cell contents)
3: if (1) is correct, it retrieves the picture from "C:/Users/jeff/Documents/Standards/" and pastes it as a cell comment background in the cell to the right (and overwrites any comment backgrounds that might already exist there)
The code below does something a bit different: it looks in a defined range, then adds a comment with a background picture retrieved based on the text in the cell to the left.
I'm sure this is a pretty basic change, but my VBA skills aren't up to it...I've only just started reading though Walkenbach's Power Programming! I'm using Excel 2007
Sub InsertComment()
'www.contextures.comxlcomments03.html
Dim rngList As Range
Dim c As Range
Dim cmt As Comment
Dim strPic As String
On Error Resume Next
Set rngList = Range("A1:A5")
strPic = "C:/Users/jeff/Documents/Standards/"
On Error Resume Next
For Each c In rngList
With c.Offset(0, 1)...................
View 9 Replies
ADVERTISEMENT
Jan 13, 2012
I'm trying to write a bit of to take a text string collected from an inputbox, and paste it into a specific cell.
Should be easy but where my text string from the inputbox is "XYZ", when it enters it into the required cell it enters it as " ="XYZ" ".
Attempt at code is below -
Code:
Sub EmailEdit()
Dim Response As String
Response = Application.InputBox("Input administrator email address", , , , , , , 2)
'Check to see if Cancel was pressed.
If Response = "" Then
[Code] .....
View 2 Replies
View Related
Jan 18, 2013
Is it possible to insert text as a comment on another sheet based on a date?
I have Sheet 1, that has 3 columns, Name, Date, Reason
Sheet 2 is a monthly calendar with the dates in E5:AH5 and the names from D6:D10.
What I am trying to do, is when they enter their name, date and reason on sheet 1, I want the reason to to be inserted on sheet 2 as a comment in the cell that matches the date and the name.
View 1 Replies
View Related
Jun 9, 2009
When I insert a comment in a cell, my corporate version of Excel displays my employee number. How can Code a cell to populate this employee number.
View 3 Replies
View Related
Jan 18, 2010
I have data validation and conditional formatting set for my sheets. However, I cannot figure out something.
I want a "comment" box (just as if I would click on "add comment") to pop up automatically if the user enters a certain value in a cell.
For example, if cell C4="1" then no further action is required. If cell C4=anything other than "1", then the user would be required to enter a comment. I would also like the comment to autopopulate with the users login id.
I will attach the book I am working on for reference, but I do not have any code written for this as I could not figure out where to start.
View 5 Replies
View Related
Jun 11, 2009
I form a string and put that string into a selected cell as a comment. Mostly it works fine but as the string gets over a certain length (255 characters?), the string gets "truncated" in that only the characters over that length get put into the comment.
View 7 Replies
View Related
Feb 15, 2009
I would like to Insert the contents of a Range of Cells into a single Comment. ie:
The contents of Range A1:A50 into a Comment placed at F1. Is there a Macro that will do this?
View 3 Replies
View Related
Feb 11, 2010
I am trying to setup a variable from a dropdown selection box. Basically, If "Completed" is selected in the box, current date is set in the corresponding field.
The formula I have tried is:
=IF(F5="Completed",G5="",G5=NOW())
I have a variable string setup opposite of what I am going for that works:
=IF(AND(D5<>"Assigned",D5<>""),IF(E5="",NOW(),E5),"")
So if anything is showing other than assigned the date is input. But have not been able to reverse this for the desired output.
View 2 Replies
View Related
Feb 18, 2014
I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.
View 2 Replies
View Related
Nov 16, 2007
I have a spread sheet were the area is getting very limited. I need to insert a small icon and when the mouse goes over (like it does in a form tool tip) will show the value of a cell (text value) located in another sheet in same workbook, or I was thinking inset a comment next to the icon and link the comments of the comments text to cell with the text value.
View 14 Replies
View Related
Nov 16, 2007
I have a spread sheet were the area is getting very limited. I need to insert a small icon and when the mouse goes over (like it does in a form tool tip) will show the value of a cell (text value) located in another sheet in same workbook, or I was thinking inset a comment next to the icon and link the comments of the comments text to cell with the text value.
I've look the properties of this to objects and can figure it out.
View 10 Replies
View Related
Nov 20, 2009
I'd like to adapt my macro so that it would insert a blank row after it detects the the first 16 characters of text as "'Closing Balance"; or it could even detect "'Closing" as the first 8 characters if it would be simpler
The Data Begins in Row 5 of Column A
My Current Macro is as below which I have adapted from another one I used
It is not working since it is detecting for the exact text "'Closing Balance" whereas the data registry would write "'Closing Balance as at 31/10/2009" , of which the "as at dd/mm/yyyy" portion would change every time a report is exported, but the first part "'Closing Balance" or even just the word "'Closing" will always be the same.
View 6 Replies
View Related
May 28, 2007
if choose a cell then the code works fine, but when i choose a selection of cells
(ex. A1 A2A3 A4) then the code fail to excute in this line: Invalid proceduer call or argument error
.AddComment "hmk :" & Chr(10) & " value was " & ActiveCell.Value
and then fail to excute in this line: typr mismatch error
Selection.Value = (Selection.Value) * r
now here, does have to be loop to solve
here is the full code
Sub test()
Dim r As Integer
ActiveCell.ClearComments
View 5 Replies
View Related
Feb 12, 2009
Cell B4 is selected by user and then runs the macro. The macro then looks UP (A3, A2, A1 etc) cell by cell until it finds the first cell that has a valid date in it and if that date is same as the date that the macro is being run pastes "This Text" into the comments section (Not replacing everything in the comments but simply adding to it.)
Column A
2/20/2009
(empty cell)
Dave
Jonathan
Steve
2/21/2009
James
Sally
Tyler
(empty cell)
John
Betty
View 5 Replies
View Related
Feb 17, 2014
I'm trying to copy and column of text (R4:R300) and paste the text as comments in the previous column (Q4:Q300).
View 3 Replies
View Related
Jul 4, 2014
I have a table with huge amount of data. I use a UserForm with textboxes to populate the information of the required row.
There's a Comment Box text on a specific cell that I need to populate on one of the textboxes but I am unable to do it.
The code I have that works well, populates the cell content:
[Code].....
Now, on that cell, there's a comment text that I need it populated as well on another textbox but it doesn't work. I tried:
[Code] .....
But this doesn't work.
View 8 Replies
View Related
Jun 22, 2008
i have the following code to insert comments into cells, however if the user cancels the input box (i.e. doesn't insert any text), a comment is still added with their details and the comment 'FALSE'. Is there anyway to stop comments being added if the user cancels the input?
Sub Insert_Comment()
Dim iReply As Integer
Dim cl As Range
Dim sComment As String
Dim sText As String
Dim UserNameWindows As String
View 4 Replies
View Related
Feb 11, 2009
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.
View 2 Replies
View Related
Feb 3, 2014
The list of data is shown in sheet1
In sheet2 I have shown the data that is copied
I have manually shown comments on 2 cells in sheet2 that shows detailed description on how was the total taken.
I need the comment on all the cells from D8 to G11 (not taking the total column) that shows on how was the total taken.
When any entry in sheet1 is inserted or deleted the comment in sheet2 should change accordingly.
I also do not want to freeze the cells D8:G11 as when new entries are made or deleted the columns would increase or decrease.
All blank cells I do not need any comment.
View 7 Replies
View Related
Feb 1, 2013
How to make excel automatically insert a comment into a cell when a / is entered into that cell?
The comment needs to simply include the date the / was entered and nothing else.
View 8 Replies
View Related
Sep 28, 2007
scenario: sheet & work book are protected to users; however need them to sometimes insert a comment to this sheet.
all columns/rows are locked except columns K, R, Y and every 7th column thru CJ (rows are from 4 - 100).
how do I enable a user to insert a comment without unprotecting sheet / WB? note: there's no pattern, it could be any cell within aforementioned columns.
View 9 Replies
View Related
Jun 3, 2006
I wanted to make a simple macro forinserting a comment, given certain parameters: margins & alignment...but its not working...how would i get this to function properly
ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:=""
With Selection.Font
. Name = "Tahoma"
.FontStyle = "Bold"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False...............................
View 2 Replies
View Related
Mar 24, 2005
attached excel file .I need the data thats there from B4:E8 to be displayed on cell I9 as a comment .is there any way to do it ?
View 6 Replies
View Related
Dec 7, 2009
Is there a way to auto insert a cell Comment when a particular value is entered and then have the Comment copied to a cell in another worksheet in the same workbook?
The value entered into the cells i want this function to work with is from a Validation list. If the cell's value was to change, for instance the user going back to a cell to change the value for whatever reason, I would like the previous comments to remain and then give the user the choice to edit comment or not.
I've had a look in the Forums using search but nothing close seems to be forthcoming.
View 14 Replies
View Related
Jan 17, 2012
I have a user-form with around 10 text-boxes. Each one of them has labels.
I was wondering if there was any way to add a function similar to the "insert-> comment" available in excel? So that there would be a tiny marker and when the mouse hoovered over it, some text in a comment bubble would be revealed? Or even better that somehow using VBA that each time you enter a text-box a comment would temporarily appear?
For a variety of reasons I can't just add labels with this info. This info would be instructions on what sort of data you should add to the field, and the instructions in some cases will be quite long and the user-form is too big as it is.
View 3 Replies
View Related
May 21, 2014
When i right click in a cell i have all of a sudden lost the option to Insert Comment.
View 6 Replies
View Related
Jul 5, 2012
I have a table refreshed from a MySQL database that I use to create a report. I can use this data quite well using formulas in the cells.But in order for me to add more information to the report I use without making it cluttered I need to add some data as comments.
I have created a loop that picks up some cell values that I want to use as criteria but I cant work out how to use these variables to search through the table and get the info I require to put in the comment. In a cell I would use offset/match or index/match to get the required cell value but how do I do this in VBA?
View 2 Replies
View Related
Dec 3, 2013
I've found many resources that tell me how to allow for the insertion/editing of comments within a protected worksheet. When I protect the worksheet, I can select "Edit objects" to allow anyone to insert comments.
However, my issue is that I'd like the Insert/Edit comment functionality to require a password, and this happens to be the opposite of what those resources instruct. I also want the content in those same cells to be editable by anyone.
View 2 Replies
View Related
Sep 11, 2007
I have created an attendance tracker for a team of people at work. It simply involves a grid of the days of the month and on each 'day' (or cell) I have set up the Validation command to prompt the the user to select whether they were at work, on holiday, off sick etc. etc from a drop down box. If they do not change the cell, its defaulted value is that they are in work.
When a user selects the days that they are planning a holiday in the future, they are meant to write a comment on the cells they have changed, to advise when they had 'requested' the holiday.
What I would like is (a macro?) which makes the comment box automatically 'pop up' when they change a cell from its default value prompting them to fill in the details rather than relying on them to 'add comments' manually.
In addition, what would be the best way to 'restrict' them from booking holiday within the next 7 days - we have a problem with people booking holiday on 'lastminute.com' for 2 days time, booking off the holiday on the spreadsheet and saying that they had it planned for weeks!
View 9 Replies
View Related
Mar 20, 2014
I have a protected sheet. When someone enters a value in column A, I want a value to be inserted into the corresponding row in column G.
E.g. When I enter date in cell A45, I want the time this date was entered into cell G45
View 6 Replies
View Related