LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Hiding Pictures "Run-time error '1004'"

In my spreadsheet I am hiding or unhiding grouped drawing images based on a
cell value. The vba code works fine until I get up to a certain amount of
images. Is there a limit on the number of images that can be hidden or is
something else wrong? Below is the code. Like I stated above, the code
works fine until I get about 45 or more images in the sheet. Thanks in
advance.

Private Sub Worksheet_Calculate()
Dim oPic As Object
Dim AmpRange As Range
Sheet13.DrawingObjects.Visible = False
Sheet13.Pictures.Visible = False
Sheet13.Shapes("Picture 1").Visible = True
Sheet13.Shapes("Picture 2").Visible = True
For Each AmpRange In Sheet13.Range("D12:I12")
With AmpRange
For Each oPic In Sheet13.Shapes
If oPic.Name = .Text Then
oPic.Visible = True
Exit For
End If
Next oPic
End With
Next AmpRange
End Sub

 
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 correct a "run time error 1004-unable to open" problem? BillR Excel Programming 1 August 26th 08 07:21 PM
"run-time error '1004' - select method of range failed" maemi weirdoke Excel Programming 2 March 5th 08 03:15 PM
Hiding Rows Error - "Runtime Error 1004 - Unable to set the hidden property of the range class" Punsterr Excel Programming 2 April 9th 07 05:32 PM
Run-time error "1004" Select method of range class failed Tallan Excel Discussion (Misc queries) 3 March 7th 07 05:22 PM
"Run-time error '1004'" Method 'Range' of object '_global' failed. haisat[_2_] Excel Programming 0 October 20th 03 12:13 PM


All times are GMT +1. The time now is 04:20 PM.

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

About Us

"It's about Microsoft Excel"