Removing Buttons #2

Dave,

Not sure if a new post will help or not - but I wanted to 
also add that some of the error messages from your macro 
were 'out of memory'.   But when I returned to the 
spreadsheet I noticed the formula line for the button read
=EMBED("FORMS.HTML:Submitbutton.1","")

and the button was surrounded by the 4 little circles and 
I was able to delete one button -- but could not repeat 
the process.

Steve 

>-----Original Message-----
>If there's no shapes you want to keep, maybe this'll do 
it for you.
>
>(Save your file first--just in case.)
>
>Option Explicit
>Sub testme()
>
>    Dim iCtr As Long
>    Dim myErrNumber As Long
>    
>    With ActiveSheet
>        .Shapes.SelectAll
>        On Error Resume Next
>        Selection.Delete
>        myErrNumber = Err.Number
>        On Error GoTo 0
>        
>        If myErrNumber <> 0 Then
>            For iCtr = .Shapes.Count To 1 Step -1
>                .Shapes(iCtr).Delete
>            Next iCtr
>            Err.Clear
>        End If
>    End With
>End Sub
>
>If you're new to macros, you may want to read David 
McRitchie's intro at:
>http://www.mvps.org/dmcritchie/excel/getstarted.htm
>
>Steven Stadelhofer wrote:
>> 
>> I copied buttons from a WEB page into an EXCEL
>> spreadsheet.  I tried to remove the buttons using 
edit/go
>> to/special/objects  -- but it says 'no objects 
found'.  I
>> also tried to 'right click' the button and cut - but it
>> did not work either.  I can send you a sample if 
possible.
>
>-- 
>
>Dave Peterson
>ec35720@msn.com
>.

0
anonymous (74722)
7/22/2004 7:36:01 PM
excel.misc 78881 articles. 5 followers. Follow

3 Replies
543 Views

Similar Articles

[PageSpeed] 16

It sounds like there's too many shapes to select all at once.

You could try this version (I moved the .shapes.selectall within the "on error
resume next".)

So if it fails, it should fail without a message.  Then it just tries to delete
the remaining shapes one at at time.

Option Explicit
Sub testme2()

    Dim iCtr As Long
    
    With ActiveSheet        
        On Error Resume Next
        .Shapes.SelectAll
        Selection.Delete
        On Error GoTo 0

        For iCtr = .Shapes.Count To 1 Step -1
            .Shapes(iCtr).Delete
        Next iCtr

    End With
End Sub

====
But I think that this is all you'd really need:

Option Explicit
Sub testme3()
    Dim iCtr As Long    
    With ActiveSheet
        For iCtr = .Shapes.Count To 1 Step -1
            .Shapes(iCtr).Delete
        Next iCtr
    End With
End Sub


Since we know it won't select all the shapes without an error.



Steven Stadelhofer wrote:
> 
> Dave,
> 
> Not sure if a new post will help or not - but I wanted to
> also add that some of the error messages from your macro
> were 'out of memory'.   But when I returned to the
> spreadsheet I noticed the formula line for the button read
> =EMBED("FORMS.HTML:Submitbutton.1","")
> 
> and the button was surrounded by the 4 little circles and
> I was able to delete one button -- but could not repeat
> the process.
> 
> Steve
> 
> >-----Original Message-----
> >If there's no shapes you want to keep, maybe this'll do
> it for you.
> >
> >(Save your file first--just in case.)
> >
> >Option Explicit
> >Sub testme()
> >
> >    Dim iCtr As Long
> >    Dim myErrNumber As Long
> >
> >    With ActiveSheet
> >        .Shapes.SelectAll
> >        On Error Resume Next
> >        Selection.Delete
> >        myErrNumber = Err.Number
> >        On Error GoTo 0
> >
> >        If myErrNumber <> 0 Then
> >            For iCtr = .Shapes.Count To 1 Step -1
> >                .Shapes(iCtr).Delete
> >            Next iCtr
> >            Err.Clear
> >        End If
> >    End With
> >End Sub
> >
> >If you're new to macros, you may want to read David
> McRitchie's intro at:
> >http://www.mvps.org/dmcritchie/excel/getstarted.htm
> >
> >Steven Stadelhofer wrote:
> >>
> >> I copied buttons from a WEB page into an EXCEL
> >> spreadsheet.  I tried to remove the buttons using
> edit/go
> >> to/special/objects  -- but it says 'no objects
> found'.  I
> >> also tried to 'right click' the button and cut - but it
> >> did not work either.  I can send you a sample if
> possible.
> >
> >--
> >
> >Dave Peterson
> >ec35720@msn.com
> >.

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
7/22/2004 10:57:33 PM
Thanks Dave - >Sub testme3() seemed to work fine.
Steve

>-----Original Message-----
>It sounds like there's too many shapes to select all at 
once.
>
>You could try this version (I moved 
the .shapes.selectall within the "on error
>resume next".)
>
>So if it fails, it should fail without a message.  Then 
it just tries to delete
>the remaining shapes one at at time.
>
>Option Explicit
>Sub testme2()
>
>    Dim iCtr As Long
>    
>    With ActiveSheet        
>        On Error Resume Next
>        .Shapes.SelectAll
>        Selection.Delete
>        On Error GoTo 0
>
>        For iCtr = .Shapes.Count To 1 Step -1
>            .Shapes(iCtr).Delete
>        Next iCtr
>
>    End With
>End Sub
>
>====
>But I think that this is all you'd really need:
>
>Option Explicit
>Sub testme3()
>    Dim iCtr As Long    
>    With ActiveSheet
>        For iCtr = .Shapes.Count To 1 Step -1
>            .Shapes(iCtr).Delete
>        Next iCtr
>    End With
>End Sub
>
>
>Since we know it won't select all the shapes without an 
error.
>
>
>
>Steven Stadelhofer wrote:
>> 
>> Dave,
>> 
>> Not sure if a new post will help or not - but I wanted 
to
>> also add that some of the error messages from your 
macro
>> were 'out of memory'.   But when I returned to the
>> spreadsheet I noticed the formula line for the button 
read
>> =EMBED("FORMS.HTML:Submitbutton.1","")
>> 
>> and the button was surrounded by the 4 little circles 
and
>> I was able to delete one button -- but could not repeat
>> the process.
>> 
>> Steve
>> 
>> >-----Original Message-----
>> >If there's no shapes you want to keep, maybe this'll 
do
>> it for you.
>> >
>> >(Save your file first--just in case.)
>> >
>> >Option Explicit
>> >Sub testme()
>> >
>> >    Dim iCtr As Long
>> >    Dim myErrNumber As Long
>> >
>> >    With ActiveSheet
>> >        .Shapes.SelectAll
>> >        On Error Resume Next
>> >        Selection.Delete
>> >        myErrNumber = Err.Number
>> >        On Error GoTo 0
>> >
>> >        If myErrNumber <> 0 Then
>> >            For iCtr = .Shapes.Count To 1 Step -1
>> >                .Shapes(iCtr).Delete
>> >            Next iCtr
>> >            Err.Clear
>> >        End If
>> >    End With
>> >End Sub
>> >
>> >If you're new to macros, you may want to read David
>> McRitchie's intro at:
>> >http://www.mvps.org/dmcritchie/excel/getstarted.htm
>> >
>> >Steven Stadelhofer wrote:
>> >>
>> >> I copied buttons from a WEB page into an EXCEL
>> >> spreadsheet.  I tried to remove the buttons using
>> edit/go
>> >> to/special/objects  -- but it says 'no objects
>> found'.  I
>> >> also tried to 'right click' the button and cut - 
but it
>> >> did not work either.  I can send you a sample if
>> possible.
>> >
>> >--
>> >
>> >Dave Peterson
>> >ec35720@msn.com
>> >.
>
>-- 
>
>Dave Peterson
>ec35720@msn.com
>.
>
0
anonymous (74722)
7/23/2004 2:21:04 PM
Glad it worked.

anonymous@discussions.microsoft.com wrote:
> 
> Thanks Dave - >Sub testme3() seemed to work fine.
> Steve
> 

<<snipped>>

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
7/23/2004 10:52:40 PM
Reply:

Similar Artilces:

2 related re string formatting and function behavior.
1. It's a puzzlement: I entered the function =CONCATENATE(H1," ",H2) and that's exactly what I got in the cell -- the literal function, including "=". The cell is formatted General. Moreover, if I insert a mistake: =CONCATENATE (H1," ",H2) ^space The syntax checker pops up and when I allow it to fix the function The newly fixed function is identical to the original one. And it works! This seems to be true of all functions, not just strings. I tried =Sum(1,2) with the same outc...

Using 2 dsl modems with 1 lan connection on Windons SBS 2003 r1
Greetins I have a customer that has a sbs server that used to send thier email traffic to 1 dsl modem and all internet traffic to another. When they moved to a new building this was changed back to 1 dsl modem . They now have use of another internet connection and would like it set back up .. The reason they are doing this is because they have a big project due and the building is letting them get on thier fiber provider back bone for a few days . I would of like all traffic to go the fiber but the provider does not have reverse dns and all out bound emails fail. so I would li...

expand/collapse row button
can I place a button any where in the worksheet to collapse/expand rows? I would like to place a button +/- on column D to expand/collapse row 2 to 5 (instead of using the grouping tool where you find the button at the left most corner). Thank you for any assistance. A B C D row 1 row 2 row 3 row 4 row 5 -- caii Excel 2003 No need for a button You could put the following code in the Worksheet_Selection Change event. It will hide rows 2 to 5 whenever a cell in column D is selected. Similarly it will unhide the rows if column E is selected If yo...

Microsoft Outlook 2003
I did what you said but now I cannot find the *.oft file that I saved. How do I open that file? "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message news:%23fsvHoSTHHA.2212@TK2MSFTNGP02.phx.gbl... I said you should not use a ***published*** custom form. If all you need is a standard message to send frequently, turn off Word as your email editor, create the message, save it as an .oft file. You can then turn WordMail back on. When you want to send a message, just double-click the .oft file. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Out...

cannot send or receive #2
I could not open my office products yesterday so I did a reload of software. I am using my outlook email account now and it says the mail went through the send and receive but I still have mail in outbox and did not receive anyting. I have the account set up correctly and when I go out to my ISP's web site....the web email is there. my hotmail account works...just cannot get outlook to work. thanks ...

MFC and JNI #2
Hi all! We have a big project using MFC. Now we want migrate step by step to java. so we want to use JNI to call our Dll's (with MFC). In the DLL is an application Objekt. the method InitInstance will be called. But the functions AfxGetInstanceHandle() and AfxGetResourceHandle() returns NULL. So the DLL-call crashes. What must we do, to init the MFC correct? Oh, i found a solution ... Must save in InitInstance the module state and in all JNI-Function Calls get the module state back [AFX_MANAGE_STATE( theApp.GetModuleState())]. ...

MailMerge Problem #2
This *might* be a Word problem, but I have a feeling its not. Excel XP, Word XP. I'm merging data from Excel into Word. I have cells that have data like: 101, 107, 109, etc and they merge fine. However, when I get to the cells with data like : QB101, QB107, QB109 I get a "0" in the field instead of my data. The column is formatted as text. When I do a =ISTEXT I get a "true" response, yet I still get a "0". Any idea what I'm doing wrong, or what I need to fix/change? Thanks in advance for your help! Doreen ...

Outlook programming #2
I need to restrict a user from closing out of a task if the completed date is later than the due date without putting something in the description. I have tried to look at macro's but couldn't find anything valuable there. Any help would be greatly appreciated We need some context here. Is part of a custom task form? An Outlook = add-in? Some other type of application?=20 --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Po...

Controlling an ActiveX Spin Button
Hello, I am using a spin button (Forms toolbar) to control the value of a single decision variable (cell) in my spreadsheet. Unfortunately, the incremental change allowed by the UserForms spin button is integer and >=1. Ideally, I would like the change to be 0.1 but I understand this requires VBA programming knowledge which, unfortunately, I don't have! Can anyone help me get round this? Thanks in advance, Dennis Maybe you could use a linked cell and a formula that refers to that linked cell: =a1/10 and then use that cell in further calculations/displays. d.stephanou@gmail.com...

Pie Chart #2
I have a column titled "On time" the entries underneath this title are either"Yes", "NO", or "NOT COMPLETED". I want to create a pie chart with the percentages of Yes and NO. Please help. Thanks in advance. In one cell, use the formula =COUNTIF(A1:A100,"=YES"). In another, =COUNTIF(A1:A100,"=NO"). Build your graph from the results of those two cells. Hope this helps. Jane "Dahlman" wrote: > I have a column titled "On time" the entries underneath this title are > either"Yes", "NO&qu...

Data Sort #2
I have two columns of data that runs into the thousands. e.g. Column A Column B AU/TCACNEILQ01 AU/TCABRAXASN01 AU/TCACOAA01 AU/TCACAIDAUN01 AU/TCACRICKTV04 AU/TCACCGAMN01 AU/TCACRICKTV04 AU/TCACCOAUSN01 AU/TCACRICKTV05 AU/TCACECOMPN01 AU/TCACRICKTV05 AU/TCACERCOMN01 AU/TCACTIVEIN01 AU/TCACERCOMN02 AU/TCADELSA02 AU/TCACHGLOBN01 AU/TCADIDN01 AU/TCACIERN01 AU/TCADMAN01 AU/TCACOAA01 What is the fomular, or how do I match data in column A to Column B to find out all the data that doesn't have a match, and produce an output column? Regards Ryan Ryan See Chip Pe...

CToolBarCtrl InsertButton
Hello, We are experiencing a problem with dynamically adding buttons to toolbars -- that is, inserting buttons after the toolbar has already been created and displayed. When the toolbar is docked horizontally, all is well. However if the toolbar is docked vertically, inserting a button in the middle makes the toolbar control bigger, puts the new button in, however, the other buttons don't shift down. Therefore, the button that was located at the insertion position is not visible. If the toolbar is floating and it has been resized to multiple rows, inserting and deleting buttons can result ...

Cell Formula reference to cell Based On third Cell Content #2
I want to build a formula in one cell that calls a second based on the numeric value in a third. Specifically, Say the frst cell is F10. I want it to look up the number in F1, and then if F1=1, F10=E9*something if F1=2, F10=D9*something if F1=3, F10=C9* something etc. Hi! I notice that you use "etc" which means there are more. Exactly how many more? That number will determine the best way to approach this. Biff >-----Original Message----- >I want to build a formula in one cell that calls a second based on the >numeric value in a third. > >Specifically, Say...

CInternetSession
Hi I am downloading html files from the internet by using CInternetSession derived class. The problem is that it's not asynchronous. That's a pain task to download 10 or more files at the same time (I am using Multithread class to send requests at the same time). does anybody knows how to get http file asynchronously? That is, not to wait until the current download is done to execute the next... (in a multithread method abviously). There is a flag INTERNET_FLAG_ASYNC that can be set on the OpenURL function but it crashes with it... thanks Mathieu ...

Performance Monitoring for CRM 4.0 with SCOM or another tool? #2
Hi. As far as I can tell, the only performance monitoring pack for CRM 4.0 is for MOM; however we run Microsoft SCOM. I was wondering the following: 1. Could someone be nice enough to post the CRM MOM counters and thresholds so we can build our own perfmon script? 2. Could someone let me know if a monitoring pack for SCOM will someday be available? (either from MS or 3rd party) 3. Could someone let me know if there is an existing 3rd party utility I could use to monitor my CRM environment (I haven't seen one but maybe there is one). Thank you! ...

How can I get my Outlook Express Addresss Book to new laptop? #2
How can I get my Outlook Express Addresss Book from my old laptop to new laptop? I cannot transfer the .wab file after I have copied it onto a zip disc. Murray <Murray@discussions.microsoft.com> wrote: > How can I get my Outlook Express Addresss Book from my old laptop to > new laptop? I cannot transfer the .wab file after I have copied it > onto a zip disc. Ask in an Outlook Express newsgroup. -- Brian Tillman ...

MIN of a difference? #2
Alex, That's pretty much what I need, except, I would like the actual number to show up instead of the difference. So if my list is: (101, 102, 110, 95, 90) I would like the formula to return a value of 101. Any ideas? Thanks, Moe -- Moe ------------------------------------------------------------------------ Moe's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=12500 View this thread: http://www.excelforum.com/showthread.php?threadid=274565 Hi try my formula together with INDEX -- Regards Frank Kabel Frankfurt, Germany "Moe" <Moe.1f3rcn...

Delivery Status Notification #2
Hi, we set in our Exchange 2003 organisation a mail size limit of 5MB. If externals send us a larger message they get a DSN as followed: Reporting-MTA: dns;mail1.domain.tld Received-From-MTA: dns;mail2.domain.tld Arrival-Date: Mon, 14 Mar 2005 17:37:27 +0100 Action: failed Status: 5.2.3 X-Display-Name: ABC@DOMAIN.TLD The disadvantage is that the Diganostic Code is missing ("mail size limit") at all. Internally it is working but our customers don't always know what "Status: 5.2.3" stands for ;-) We have the same issue with all other DSN's. Is there a way to c...

Forwarding mail through exchange 2003 #2
Just installed exchange 2003 on network that is using unix mail which is Pop 3. We are setting up exchange but want to forward mail from exchange to the unix server until we make the cut over. Could someone help me with setting up forwarding on the exchange server to unix mail. Thanks. Properties of the Default SMTP server. Messages tab, Forward All Mail With Unresolved Recipients To Host field. HTH N. "Earl" <anonymous@discussions.microsoft.com> wrote in message news:a0bd01c3eb29$6cde7290$a401280a@phx.gbl... > Just installed exchange 2003 on network that is using ...

Printing a report 2-up
How do I go about creating a report that retrieves data from my table and produces a report of that data 2-up (side by side). ! record on the left and the next record on the right? -- Thank you for your help. You can do it with a snaking columns report that goes across then down. Steve santus@penn.com "Bill" <Bill@discussions.microsoft.com> wrote in message news:0BEB5772-9F33-4DD6-B4D1-D105679FBA9F@microsoft.com... > How do I go about creating a report that retrieves data from my table and > produces a report of that data 2-up (side by side). ! rec...

Using the 1.2 Word Templates for Quotes in CRM 3.0
Hi, We had a Template for Quotations that worked fine. We used in the template: {IF =ABMerge Sequence #=BB =3D "1" "} and at the end of the template we used: {IF =ABLastItem=BB =3D"1" "}. We managed to edit the crm quote template in order to create this template. For some reason, it doesn't work in CRM 3.0! The first part works, but all the lines that appear after {IF =ABLastItem=BB =3D"1" "} doesn't appear in the merged quotation. Why is that? I have read in the group about an addon that must be purchased, but I would like to be sure th...

pls help troubleshoot ms office...unable 2 configure ..so unable
-- mcp Where do you get stuck and in which version of Outlook? Account settings for the largest free email providers can be found here; http://www.howto-outlook.com/howto/accountsettings.htm BTW: Next time, use the body to specify your configuration and to clarify your request. -- Robert Sparnaaij [MVP-Outlook] Coauthor, Configuring Microsoft Outlook 2003 http://www.howto-outlook.com/ Outlook FAQ, HowTo, Downloads, Add-Ins and more http://www.msoutlook.info/ Real World Questions, Real World Answers ----- "Rambo" <Rambo@discussions.microsoft.com> w...

Multi-Currency Question #2
Hello there, I would like to know why Customer balance is not adjusted automatically if I enter data with a different currency. For example if I enter 2000 in non-base currency as invoice with exchange rate of .0004 and pay it with exchange rate of .003, it shows that the customer still has balance of of 2 base. But I have paid all the non-base amount, but there are some Realized loss. Here is how I did: (All in in Non-Base Currency): Invoice: Qty Amount Total Currency Rate Base Amount(Calculated) 10 200 2000 .004 8 Pay...

unblocking #2
I have received an .exe program from someone that I know and would like to unblock it so that I can use it. I know that it is safe I sent it from his house, how do I unblock it? Thanks Sorry if this appears twice See http://www.slipstick.com/outlook/esecup/getexe.htm to learn how to get the attachments off. One popular method is Attachment Options from www.slovaktech.com For more information on the security features, see http://www.slipstick.com/outlook/esecup.htm If you use OE, hit Forward on a message and open or save the attachment, then close the message. Or disable it using tools | o...

Email link to update Outlook --- Calendar #2
Anyone knows how to send an link within an email, inwhich the Recipient can click to have the their Outlook "Calendar" automatic updated with appointment information. I have seen this work, can't find inforamtion on how to create this link. Thanks Anthony wrote: || Anyone knows how to send an link within an email, inwhich || the Recipient can click to have the their || Outlook "Calendar" automatic updated with appointment || information. I have seen this work, can't find || inforamtion on how to create this link. Thanks In Calendar, right-click on the event...