Missing VBA code for Excel [Format Comment]-[Colors and Lines]-[Fill Effects]-[Picture]-[Lock picture aspect ratio]

reinht 21 Reputation points
2021-08-21T09:32:09.07+00:00

I can't find any Excel VBA code for:

With Cells(1, 1).Comment.Shape  
  .Fill.UserPicture "C:\Users\JohnDoe\Pictures\Picture.jpg"  
    
  '\How to set option [Format Comment]-[Colors and Lines]-[Fill Effects]-[Picture]-[Lock picture aspect ratio] in VBA?  
    
  '\Following line is not the same  
  .LockAspectRatio = msoTrue  
End With  

125252-2021-08-21-11-00-27.png

Cells(1, 1).Comment.Shape..LockAspectRatio = msoTrue is not the same

Any ideas?

TIA
Reinhard

Microsoft 365 and Office | Development | Other
Developer technologies | Visual Basic for Applications
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.