PC Review


Reply
Thread Tools Rate Thread

Delete some textboxes with tag,VBA

 
 
Edward
Guest
Posts: n/a
 
      19th Nov 2008
Hi everybody,
I have added some textboxes in PP with special sequence of numbering and I
have added a tag to them "SLDHNUM" now I want to use the following code to
delete them but this code doesn't work any thoughts?

For lx = 1 To ActivePresentation.Slides.Count
For ly = 1 To ActivePresentation.Slides(lx).Shapes.Count
If ActivePresentation.Slides(lx).Shapes(ly).Tags.Count > 0 Then
If ActivePresentation.Slides(lx).Shapes(ly).Tags.Name(1) = "SLDHNUM"
Then
ActivePresentation.Slides(lx).Shapes(ly).Delete
Exit For
End If
End If
Next
Next

by the way I used "for each" version of the loops but still didnt work.
--
Best regards,
Edward
 
Reply With Quote
 
 
 
 
Edward
Guest
Posts: n/a
 
      19th Nov 2008
Okay I guess i know what was the reason. I'm using this code in combination
with PP's printdialogbox and I missed the point that PP dialg boxes are
modeless and they don't stop the execution of the code untill users responses
to them. Now I guess my question is

lets say we have a code liek this
sub test()

some code here

CommandBars.FindControl(Id:=4).Execute

"some other code" here
end sub
is there a way to stop execution of "some other code" section until user
responds to the print dialog box ?
--
Best regards,
Edward


"Edward" wrote:

> Hi everybody,
> I have added some textboxes in PP with special sequence of numbering and I
> have added a tag to them "SLDHNUM" now I want to use the following code to
> delete them but this code doesn't work any thoughts?
>
> For lx = 1 To ActivePresentation.Slides.Count
> For ly = 1 To ActivePresentation.Slides(lx).Shapes.Count
> If ActivePresentation.Slides(lx).Shapes(ly).Tags.Count > 0 Then
> If ActivePresentation.Slides(lx).Shapes(ly).Tags.Name(1) = "SLDHNUM"
> Then
> ActivePresentation.Slides(lx).Shapes(ly).Delete
> Exit For
> End If
> End If
> Next
> Next
>
> by the way I used "for each" version of the loops but still didnt work.
> --
> Best regards,
> Edward

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Data from textboxes nir020 Microsoft Excel Programming 2 26th Nov 2007 06:29 PM
Delete text in bound textboxes ? SpookiePower Microsoft Access Forms 3 3rd May 2007 05:46 PM
Textboxes - restrict double-click and selection.delete korrin.anderson@gmail.com Microsoft Excel Programming 0 18th May 2006 09:07 PM
Newbie Update, Insert, & Delete Using Visual Studio And TextBoxes =?Utf-8?B?UmljaA==?= Microsoft C# .NET 2 8th Aug 2005 11:07 PM
How to Delete a child row using textboxes and datarelations Charles Microsoft ADO .NET 0 29th Sep 2003 05:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:17 PM.