Can not Insert Picture to userform or image form

najmi mohamed 5 Reputation points
2024-06-04T08:39:57.0533333+00:00

Hi ,

if i click to add picture to user for or any tools in VBA prosperities , no thing happened

When I press the button bellow to add an image or background in all VBA Forms and tools , there is no response to the button and it is not possible to add an image I have deleted and reinstalled Microsoft Office but the problem still persists

for more clarify the button act as if its just a decor it doesn't show any respond even to click or dub click

my office is 365

User's image

Windows for business | Windows 365 Business
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Development | Microsoft 365 Publishing
{count} votes

1 answer

Sort by: Most helpful
  1. AlexZhu-MSFT 6,591 Reputation points Moderator
    2024-06-05T05:32:33.6366667+00:00

    Hi,

    Is it possible to insert picture with code? For example:

        Set Img = UserForm1.Controls.Add("Forms.Image.1")
       
        With Img
            'Load Picture to Image Control
            .Picture = LoadPicture("C:\test.jpg")
           
            'Align the Picture Size
            .PictureSizeMode = fmPictureSizeModeStretch
           
            'Image Position
            .Left = 50
            .Top = 10
        End With
    

    Regards,

    Alex

    1 person found this answer helpful.

Your answer

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