View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default My macro doesn't work if sheet is protected but it works if not protected

Hi,

Am Tue, 11 Feb 2014 09:05:17 -0800 (PST) schrieb :

Set c = Cells.Find(What:=Replace(imagen, ".jpg", ""))

Label3 = c.Offset(0, 1) <<<--- ERROR HERE


change it to:

Set c = Cells.Find(What:=Replace(imagen, ".jpg", ""))

if not c is nothing then
Label3 = c.Offset(0, 1)
Label2 = c.Offset(0, 2)


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2