Thread: Excel 2010 VBA

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Excel 2010 VBA


    I am trying to do a simple button to picture code however I am new to Visual Basics so I do not know where to begin....Here is a description of my issue:

    I am just trying to implement a button click on the excel worksheet so that a picture pops up after a button click.

    (Yeah when I meant simple, its that simple) I tried to use the shell function to have the picture pop up from my file on my computer however it did not work.

    Any help would be appreciated.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0
    Oh and I have the button already on the excel file, but the problem is the module code.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    194
    Rep Power
    328
    One easy way to get this work is to record a macro, then check the code.
    Code:
    Range("B4").Select  ' select the cell for the upper left corner of pic's position...
    ActiveSheet.Pictures.Insert("D:\stuff\pic.jpg").Select  'and then insert the picture...

IMN logo majestic logo threadwatch logo seochat tools logo