Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Error
I have a macro that seems to be unfinished. I want a macro to activate when
a cell = "Yes". The macro will open the my pictures folder for someone to insert a pic. I modified the macro so the picture will fit in the cells and be resized. I have two of these macros on the same row but in different columns. When I run the macro with the frist cell it works fine. The second one however will place the picture in the first cell that I started with and open the my picture document a second time. Here is the code: Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = True If Me.Range("B186").Value = "Yes" Then Application.Dialogs(xlDialogInsertPicture).Show Selection.Height = Range("A183:D191").Height Selection.Width = Range("A183:D191").Width Selection.Top = Range("A183:D191").Top Selection.Left = Range("A183:D191").Left Selection.Placement = xlMoveAndSize End If ws_exit: Application.EnableEvents = True End Sub Can someone assist me with this problem? Thank you, |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
naming tab macro error runtime error 1004 | Excel Programming | |||
Macro 'Automation error' with ChemOffice Excel macro | Excel Programming |