LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Clear Files Displayed As Icons

Hello,

I have a variety of controls on my worksheets, including checkboxes, radio
buttons, text buttons and files displayed as icons.

I have code that clear these when the user is ready to begin from scratch
again.

The following code works fine, but I'm not sure how to add the code for the
icons. These will probably be Word files or pdf for the most part.

Thanks.

Dim Ctrl As OLEObject

'Clear check boxes
With ActiveSheet
For Each Ctrl In .OLEObjects
If TypeName(Ctrl.Object) = "CheckBox" Then
Ctrl.Object.Value = False
End If
Next Ctrl
End With

'Clear radio buttons
With ActiveSheet
For Each Ctrl In .OLEObjects
If TypeName(Ctrl.Object) = "OptionButton" Then
Ctrl.Object.Value = False
End If
Next Ctrl
End With

'Clear text boxes
With ActiveSheet
For Each Ctrl In .OLEObjects
If TypeName(Ctrl.Object) = "TextBox" Then
Ctrl.Object.Value = ""
End If
Next Ctrl
End With



 
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
files in folders turning into icons richardg Excel Discussion (Misc queries) 1 December 16th 08 08:46 AM
how files are displayed in the open file window Brett Excel Discussion (Misc queries) 4 February 21st 08 08:51 PM
How to increase the number of files displayed when I click 'file' Roger L B Excel Discussion (Misc queries) 3 August 3rd 07 06:42 AM
How can alert icons be displayed? Bill Excel Programming 1 March 4th 07 10:14 AM
Bizarre MS EXCEL problem - files will not open via document ICONs Filk.com Excel Discussion (Misc queries) 2 May 5th 06 05:59 PM


All times are GMT +1. The time now is 02:03 AM.

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

About Us

"It's about Microsoft Excel"