if you would like to select any image and add as a comment to activecell
Here is the code-
Sub test()
Dim s As String
s = Application.GetOpenFilename("Image Files (*.bmp;*.gif;*.jpg;*.jpeg)," & "*bmp;*gif;*.jpg;*.jpeg")
ActiveCell.AddComment.Text "akoul.blogspot.com"
ActiveCell.Comment.Shape.Fill.UserPicture s
End Sub
It will open a folder browse window.Choose any image and will add as comment to activecell.
Subscribe to:
Post Comments (Atom)
Import data from SQL
Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...
-
If you have added the shape in the sheet and now you want to change it color , text , font size ,etc using VBA. Snapshot below Code- Su...
-
If you want to add a new pop up button on mouse right click menu and as soon as you click on it . It shows you multiple buttons with macro a...
How can you also set height and width using this as a start?
ReplyDelete@McCapo Please try these statements . See if it helps
ReplyDeleteActiveCell.Comment.Shape.Height = 100
ActiveCell.Comment.Shape.Width = 100