Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error 1004: Unable to get the axis property | Charts and Charting in Excel | |||
Runtime error 1004 | Excel Discussion (Misc queries) | |||
unable to protect cells in macro sheet b/c runtime error 1004 | Excel Worksheet Functions | |||
runtime error 1004 HELP PLS | Excel Discussion (Misc queries) | |||
What causes runtime error 1004? | Excel Discussion (Misc queries) |