Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet which contains lines that have been drawn using vba.
During the drawing the process they are named like this myLine.Name = "Arrow" & CStr(PasteRow). The variables "myline" (shape object) and "pasterow" (long number)have been declared and defined. When content on the spreadsheet changes the arrows' positions and lengths can be affected, or they may be deleted if no longer needed. I need to search to see if an arrow exists, change it and or delete it. What do you suggest (using Excel 2003 SP2)? -- Thanks! Mona-ABE |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim myShape
if ActiveSheet.shapes.count0 then for each myShape in ActiveSheet.shapes if myShape.name = "Arrow" then 'stick code in here for the actions you want to take once this shape has been found end if next end if Not sure if the above helps - but maybe its a start J On 30 May, 14:25, Mona-ABE wrote: I have a spreadsheet which contains lines that have been drawn using vba. During the drawing the process they are named like this myLine.Name = "Arrow" & CStr(PasteRow). The variables "myline" (shape object) and "pasterow" (long number)have been declared and defined. When content on the spreadsheet changes the arrows' positions and lengths can be affected, or they may be deleted if no longer needed. I need to search to see if an arrow exists, change it and or delete it. What do you suggest (using Excel 2003 SP2)? -- Thanks! Mona-ABE |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim s
on error resume next set s=activesheet.shapes(shapename) on error goto 0 if not s is nothing then .... do something with s end if Tim "Mona-ABE" wrote in message ... I have a spreadsheet which contains lines that have been drawn using vba. During the drawing the process they are named like this myLine.Name = "Arrow" & CStr(PasteRow). The variables "myline" (shape object) and "pasterow" (long number)have been declared and defined. When content on the spreadsheet changes the arrows' positions and lengths can be affected, or they may be deleted if no longer needed. I need to search to see if an arrow exists, change it and or delete it. What do you suggest (using Excel 2003 SP2)? -- Thanks! Mona-ABE |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check if a File Exists | Excel Programming | |||
verify a shape exists in the sheet | Excel Programming | |||
Check if filename exists. | Excel Programming | |||
How to check if the directory exists? | Excel Programming | |||
Check whether a worksheet exists already | Excel Programming |