Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 36
Default Runtime Error 1004 Unable to set the top property of the picture c

I have a workbook that contains 100 worksheets. On each work sheet I have
the following code (see below) that runs and when a particular person is
selected from a drop down list a jpg of their signature displays at the top
of each sheet.

This was working fine but I am now getting the following error after I
select a person from the drop down and then when ever i try to input data
into any other cell. The error message is:

Runtime Error '1004'" Unable to set the top property of the picture class

It then allows me to END or debug. if i select debug it opens the VBA
window to the code and highlights this line

oPic.Top = .Top

But i don't know what to to do with that line of code to debug

PLEASE HELP

thanks in advance - JB



Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("ad1")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Runtime Error 1004 Unable to set the top property of the picture c

That code works fine at my end. What happens if you comment out that line?
What changes have you made to your spreadsheet recently? When you are running
the code what is the state of oPic in your locals window just before that
line executes?
--
HTH...

Jim Thomlinson


"JB Bates" wrote:

I have a workbook that contains 100 worksheets. On each work sheet I have
the following code (see below) that runs and when a particular person is
selected from a drop down list a jpg of their signature displays at the top
of each sheet.

This was working fine but I am now getting the following error after I
select a person from the drop down and then when ever i try to input data
into any other cell. The error message is:

Runtime Error '1004'" Unable to set the top property of the picture class

It then allows me to END or debug. if i select debug it opens the VBA
window to the code and highlights this line

oPic.Top = .Top

But i don't know what to to do with that line of code to debug

PLEASE HELP

thanks in advance - JB



Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("ad1")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub


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
Error 1004: Unable to get the axis property Ana via OfficeKB.com Charts and Charting in Excel 1 June 24th 09 11:47 AM
Runtime error 1004 JR Excel Discussion (Misc queries) 2 November 21st 08 08:29 PM
unable to protect cells in macro sheet b/c runtime error 1004 rldjda Excel Worksheet Functions 1 March 20th 08 08:28 PM
runtime error 1004 HELP PLS Marcelo P Excel Discussion (Misc queries) 2 May 23rd 07 08:56 PM
What causes runtime error 1004? [email protected] Excel Discussion (Misc queries) 4 October 27th 05 07:15 PM


All times are GMT +1. The time now is 08:19 PM.

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"