+ Reply to Thread
Results 1 to 5 of 5

Inserting a picture, keeping sheet protected

  1. #1
    Registered User
    Join Date
    11-16-2007
    Posts
    1

    Inserting a picture, keeping sheet protected

    I have a macro that is assigned to a button which allows users to insert a picture into a cell. It works pretty good except for a few problems.

    1. I would like the macro to only insert the picture into a certain cell. Not the one the user has selected.

    2. If the user cancels the process of inserting a picture, it leaves the document unprotected.

    3. Once the picture is inserted, there is no way for the user to remove the picture and insert a different one if the first image was inserted in error.

    Here is the code I am using

    Please Login or Register  to view this content.
    thanks to anyone who can help with this
    Last edited by bibfocal68; 11-16-2007 at 02:43 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    12,598

    Insert Picture,delete picture,protect sheet code

    This code
    Asks if you want to delete the existing picture(s)
    will then let you select the directory and file to insert
    inserts the picture into range A1:G15
    then protects the sheet
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    99

    Re: Insert Picture,delete picture,protect sheet code

    This worked perfectly for my document, thank you so much! Sorry to resurrect an old thread (Google gave me this), but I have another question regarding this topic:

    I assigned the Macro to the picture, so when the user clicks on the picture, it asks the user to insert a new picture. The problem is once that picture has been overwritten, the Macro is gone! I figure right after the picture resizing, before the Protect sheet is where to insert the code to assign the Macro, but I have no idea how to or what to say. Help?

  4. #4
    Administrator arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,147

    Re: Inserting a picture, keeping sheet protected

    Taemex,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    08-29-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    99

    Re: Inserting a picture, keeping sheet protected

    Alright, sorry. I didn't review all the rules, I'll admit. It's late and I was tired and hoping for a quick answer. I'll just repost this question in the morning then, thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1