A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

JB Bates' Runtime Error 1004 problem



 
 
Thread Tools Display Modes
  #1  
Old December 26th, 2009, 10:32 PM posted to microsoft.public.excel.misc
Ken Johnson
external usenet poster
 
Posts: 499
Default JB Bates' Runtime Error 1004 problem

I am using Google Groups to view this forum and my three attempts at
responding to this post...
http://groups.google.com.au/group/mi...c59d83d9?hl=en
keep on disappearing.
I've not had this happen before.

I have seen the Pick a Pic code stopped by this error several times
before.
It usually doesn't happen until after a certain number of pictures
that it has to process.
Sufferers in the past have been happy with my solution, so here it is
again.
Don't dimension the oPic object as a Picture, dimension it as a Shape.
This does mean adding an extra loop so that only Pictures are rendered
invisible instead of all the Shapes...

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

Ken Johnson
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:04 AM.


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