Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Leo
 
Posts: n/a
Default How do I display textboxes without any content in a spreadsheet?

I have an Excel workbook that is extremely slow in opening up and saving. It
freezes up when I try to resize it and there is a time-lag when I scroll
within certain worksheets. There are about 7 sheets within the workbook.
Now, it came to my notice that some of the spreadsheets have many text boxes
without any content in them. As a result, they are invisible until you click
on them.

My question is: Is there a way where I can have the spreadsheet show all the
text boxes or a way that I could just delete all of them at once?

Or if you think that there might be another alternative please advise.

Thanks,
Leo
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

There's a textbox on the Drawing toolbar and a textbox on the Control toolbox
toolbar.

I think I'd delete the textboxes that are empty.

Option Explicit
Sub testme()
Dim TBox As TextBox
Dim OLEObj As OLEObject
Dim wks As Worksheet

For Each wks In ActiveWorkbook.Worksheets
For Each TBox In wks.TextBoxes
If Trim(TBox.Caption) = "" Then
TBox.Delete
End If
Next TBox

For Each OLEObj In wks.OLEObjects
If TypeOf OLEObj.Object Is MSForms.TextBox Then
If Trim(OLEObj.Object.Text) = "" Then
OLEObj.Delete
End If
End If
Next OLEObj
Next wks

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

Leo wrote:

I have an Excel workbook that is extremely slow in opening up and saving. It
freezes up when I try to resize it and there is a time-lag when I scroll
within certain worksheets. There are about 7 sheets within the workbook.
Now, it came to my notice that some of the spreadsheets have many text boxes
without any content in them. As a result, they are invisible until you click
on them.

My question is: Is there a way where I can have the spreadsheet show all the
text boxes or a way that I could just delete all of them at once?

Or if you think that there might be another alternative please advise.

Thanks,
Leo


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Workaround for Cell Display Limitation in Excel 2000 Kevin Excel Discussion (Misc queries) 5 April 20th 05 11:33 PM
Better support for dynamic content within headers and footers Anvil Scott Excel Discussion (Misc queries) 1 December 21st 04 08:33 PM
Conditional display of a .jpeg file? sbhogle Excel Discussion (Misc queries) 2 November 30th 04 05:57 AM
how to display heading of column corresponding to the cell angelrain Excel Worksheet Functions 2 November 2nd 04 04:57 PM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"