+ Reply to Thread
Results 1 to 3 of 3

How to select all hidden text boxes

  1. #1
    Manish M Kankaria
    Guest

    How to select all hidden text boxes

    Hi,
    I have just operational knowledge of Excel. I have copied few cells from one
    excel file to new excel file.
    Source file contains some macros.
    I don't know, duew to this or what, in the new file, many hidden text fields
    are there. For that reason file size is more than 5 MB which actully should
    have less than 1 MB.
    I'm unable to select all the hidden text boxes at a time to delete them.
    Please guide me in this regard.

  2. #2
    Norman Jones
    Guest

    Re: How to select all hidden text boxes

    Hi Manish,

    Try:
    '=============>>
    Public Sub Tester2()
    Dim sh As Worksheet
    For Each sh In ActiveWorkbook.Worksheets
    With sh
    .OLEObjects.Delete
    .TextBoxes.Delete
    End With
    Next sh
    End Sub
    '<<=============

    If you are not familiar with macros, you may wish to visit David McRitchie's
    'Getting Started With Macros And User Defined Functions' at:

    http://www.mvps.org/dmcritchie/excel/getstarted.htm

    Having run the above macro, you might wish to look at Debra Dalgleish's
    suggestions for resetting the used range at:

    http://www.contextures.com/xlfaqApp.html#Unused


    ---
    Regards,
    Norman


    "Manish M Kankaria" <Manish M [email protected]> wrote in
    message news:[email protected]...
    > Hi,
    > I have just operational knowledge of Excel. I have copied few cells from
    > one
    > excel file to new excel file.
    > Source file contains some macros.
    > I don't know, duew to this or what, in the new file, many hidden text
    > fields
    > are there. For that reason file size is more than 5 MB which actully
    > should
    > have less than 1 MB.
    > I'm unable to select all the hidden text boxes at a time to delete them.
    > Please guide me in this regard.




  3. #3
    Manish M Kankaria
    Guest

    Re: How to select all hidden text boxes

    Hi Norman,
    Thanks for reply.

    "Norman Jones" wrote:

    > Hi Manish,
    >
    > Try:
    > '=============>>
    > Public Sub Tester2()
    > Dim sh As Worksheet
    > For Each sh In ActiveWorkbook.Worksheets
    > With sh
    > .OLEObjects.Delete
    > .TextBoxes.Delete
    > End With
    > Next sh
    > End Sub
    > '<<=============
    >
    > If you are not familiar with macros, you may wish to visit David McRitchie's
    > 'Getting Started With Macros And User Defined Functions' at:
    >
    > http://www.mvps.org/dmcritchie/excel/getstarted.htm
    >
    > Having run the above macro, you might wish to look at Debra Dalgleish's
    > suggestions for resetting the used range at:
    >
    > http://www.contextures.com/xlfaqApp.html#Unused
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    > "Manish M Kankaria" <Manish M [email protected]> wrote in
    > message news:[email protected]...
    > > Hi,
    > > I have just operational knowledge of Excel. I have copied few cells from
    > > one
    > > excel file to new excel file.
    > > Source file contains some macros.
    > > I don't know, duew to this or what, in the new file, many hidden text
    > > fields
    > > are there. For that reason file size is more than 5 MB which actully
    > > should
    > > have less than 1 MB.
    > > I'm unable to select all the hidden text boxes at a time to delete them.
    > > Please guide me in this regard.

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1