Compile Error: Procedure too Large Question
Looks like you could only have such code appear one time and program a loop
that goes through the various cells and performs the relative action.
So you should be able to make it smaller. If not, then break it into two
macros. Half the code in one module (88 cells worth) and half the code in
another module (88 cells worth). then you can use a tiny macro to call both
Sub Master()
Macro1
Macro2
End Sub
--
Regards,
Tom Ogilvy
"Daniel R. Young" wrote in message
...
I cannot make it smaller. Here is the code:
If Target.Address = "$G$9748" Then
If Me.Range("G9748").Value = "Yes" Then
Application.Dialogs(xlDialogInsertPicture).Show
Selection.Height = Range("F9745:I9753").Height
Selection.Width = Range("F9745:I9753").Width
Selection.Top = Range("F9745:I9753").Top
Selection.Left = Range("F9745:I9753").Left
Selection.Placement = xlMoveAndSize
End If
End If
This is repeated 176 times with different values. Is there a way to make
it
smaller?
"JM" wrote:
Umm, make it smaller?
"Daniel R. Young" wrote in
message
...
If my procedure is too large what can I do to make it work?
Thank you,
Daniel
|