Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8595821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:31:51+00:00 2026-06-12T00:31:51+00:00

In my Office 2010 xlsm sheet I have created a fixed size Image ActiveX

  • 0

In my Office 2010 xlsm sheet I have created a fixed size Image ActiveX control called Image1. The following macros should in my opinion set the image path to the one which specified in cell B3, but it fails with “Run-time error ‘424’: Object required” error message at the line Image1.Picture. I checked that imPath is equal to "C:\some\valid\image\path.jpg".

Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Address = "$B$3" Then
        imPath = Range("B3")
        Image1.Visible = True         
        Image1.Picture = imPath
        Image1.PictureSizeMode = fmPictureSizeModeZoom   
        Image1.BorderStyle = fmBorderStyleNone    
        Image1.BackStyle = fmBackStyleTransparent
    End If
End Sub

What is wrong here? BTW, is there any way to check if the specified file actually exists?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:31:52+00:00Added an answer on June 12, 2026 at 12:31 am

    A quick look into excel-help, searching for picture, suggests that you use this line:

    Image1.Picture = LoadPicture(imPath)
    

    To check if the file exists, use a FileSystemObject

    Dim fs as variant
    Set fs = CreateObject("Scripting.FileSystemObject")
    fs.FileExists(imPath)
    

    edit

    by the way you can use

    imPath = Target.value
    

    to set imPath (not tested, but quite sure of this)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following setup: Sharepoint 2010 with SQL Server and Office 2010. This
I have created some InfoPath forms. I am using MS-Office 2010. I deployed these
I have the following list of links. <tr><td><a href=javascript:d(43755)> Microsoft office 2010 professional plus
I have developed a WinForm Application with VB.Net (VS2010) having Office 2010 Professional Installed,
Using Visual Studio 2010 I created an Office 2010 Word add-in project that has
I am running windows 7 x64 enterprise. I have Office 2010 x64 installed. I
I've created a Microsoft Word Office 2010 VSTO add-in and am looking for a
I just created a VSTO Add-In for Office 2010. How how do I know
I need DocumentSet class from Microsoft.Office.DocumentManagement namespace. I have Visual Studio 2010 Professional, Office
I have a Win7-64 bit OS I have MS Office 2010 32-bit installed I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.