I will try make this as clear as possible as I don’t think it is too hard to explain.
I have a macro to add a comment to a cell and insert a picture inside it as below;
.AllowMultiSelect = True
.InitialFileName = CurDir ‘directory to open the window
.Filters.Clear ‘Cancel the filter
.Filters.Add Description:=”Images”, Extensions:=”*.jpg”, Position:=1
.Title = “Choose image”
If .Show = -1 Then TheFile = .SelectedItems(1) Else TheFile = 0
‘No file selected
If TheFile = 0 Then
MsgBox (“No image selected”)
Range(“F36”).Comment.Visible = False
This works perfect but I have over 300 lines to do this same macro for.
Is there a way to modify the formula so I can just make it so if the user clicks to add the photo on line ‘x’ then comment will only be made on line ‘x’
‘x’ being whatever line number.