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: 9,101
Default For...Each loop problem

For Each obj In ActiveSheet.OLEObjects
If obj.progID = "Forms.ListBox.1" Then
'enter your code here
End If
Next obj


"synapse5150" wrote:


I am trying to loop through all the listboxes I have in an Excel
worksheet (NOT userform), and I'm having problems. If this was a
userform, I would use a for each loop (like 'for each control in
userform.controls') but I'm not sure how to translate this collection to
a worksheet. Any ideas?


--
synapse5150
------------------------------------------------------------------------
synapse5150's Profile: http://www.thecodecage.com/forumz/member.php?userid=115
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=58770


 
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
Loop Within a Loop Problem [email protected] Excel Programming 3 December 5th 07 01:23 PM
Problem with Do While loop alecbowman[_2_] Excel Programming 5 April 26th 06 12:33 AM
Loop Problem smandula Excel Programming 2 April 6th 06 02:45 PM
Loop Problem smandula Excel Programming 0 March 23rd 06 01:51 PM
Problem adding charts using Do-Loop Until loop Chris Bromley[_2_] Excel Programming 2 May 23rd 05 01:31 PM


All times are GMT +1. The time now is 01:35 PM.

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"