Hi
I would like to adress all controlelements in my worksheet one by one using
the "For Each"- statement, but i can't get it working.
Dim i As Controls
For Each i In Worksheets("Sheet1")
MsgBox i.Name
Next
Hoping for help
Claus
Hi
I would like to adress all controlelements in my worksheet one by one using
the "For Each"- statement, but i can't get it working.
Dim i As Controls
For Each i In Worksheets("Sheet1")
MsgBox i.Name
Next
Hoping for help
Claus
Hi Claus,
try something like this:
for each oleobject in worksheets("Sheet1").oleobjects
Regards,
Ivan
Dim i As Long
For i = 1 To ActiveSheet.OLEObjects.Count
MsgBox ActiveSheet.OLEObjects(i).Name
Next i
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
"Claus" <[email protected]> wrote in message
news:[email protected]...
> Hi
>
> I would like to adress all controlelements in my worksheet one by one
using
> the "For Each"- statement, but i can't get it working.
>
> Dim i As Controls
> For Each i In Worksheets("Sheet1")
> MsgBox i.Name
> Next
>
> Hoping for help
>
> Claus
>
>
Hi Ivan
Thank you, it works ;-)
Claus
"Ivan Raiminius" <[email protected]> skrev i en meddelelse
news:[email protected]...
> Hi Claus,
>
> try something like this:
>
> for each oleobject in worksheets("Sheet1").oleobjects
>
> Regards,
> Ivan
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks