Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How could i enable insert picture from VBA?

Hello Friends,

I´m trying to insert a logo to a Excel file from VBA in a protecte
worksheet. Could you give a hand to allow the user change the logo i
he needs it?

Thanks in advance,

Jose Lui

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How could i enable insert picture from VBA?

Sub InsertPicture()

Activesheet.UnProtect Password:="ABCD"
' code to insert picture and position it
Activesheet.Protect Password:="ABCD"

End Sub

--
Regards,
Tom Ogilvy

"jose luis " wrote in message
...
Hello Friends,

I´m trying to insert a logo to a Excel file from VBA in a protected
worksheet. Could you give a hand to allow the user change the logo if
he needs it?

Thanks in advance,

Jose Luis


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How could i enable insert picture from VBA?

Thank you Tom for your prompt response (as always!!).

Let explain my problem in a better way. I have a sheet that i
protected, has some stuff that needs to be untouchable by the user, bu
i would like to allow her/him to be able to change some text and a Logo
The solution already given (thanks again) unprotects the entire sheet
Is there a instruction that let me just give her/him the opportunity t
enable the Insert/Picture/from file command, without giving her/him th
chance to play around?

Best Regards

Jose Lui

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How could i enable insert picture from VBA?

I don't think so, but what I was suggesting was that you provide the
interaction with the user. Get their selection from getopenfilename for
example. Then, unprotect, import and position the image, reprotect, i.e.
the code never quits to allow the user access to the sheet. So your
exposure would be minimal.

You may be able to use finer granularity in xl2002 or xl2003 ( I don't have
a copy handy/installed) but they offered much richer levels of protection.
But I doubt they leave the menus enabled - could be wrong however.

--
Regards,
Tom Ogilvy

"jose luis " wrote in message
...
Thank you Tom for your prompt response (as always!!).

Let explain my problem in a better way. I have a sheet that is
protected, has some stuff that needs to be untouchable by the user, but
i would like to allow her/him to be able to change some text and a Logo.
The solution already given (thanks again) unprotects the entire sheet.
Is there a instruction that let me just give her/him the opportunity to
enable the Insert/Picture/from file command, without giving her/him the
chance to play around?

Best Regards

Jose Luis


---
Message posted from http://www.ExcelForum.com/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
How do I enable 'insert copied cells' (option not available in men Excel Amateur Excel Discussion (Misc queries) 1 May 24th 06 08:07 AM
How do I enable insert copied cells (option not available in menu. Excel Amateur Excel Discussion (Misc queries) 0 May 24th 06 07:58 AM
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM


All times are GMT +1. The time now is 01:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"