Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Looping A Variable Used Within An Object Name

Hi guys,

Simple bit of code:

For c = 2 To Nofcharts

With Worksheets(SheetName)
Set ZoomArray(c) = .Zoom & c
End With

Next c

What I want to do is to be able to loop through a number of objects
(they are toggle buttons) called Zoom2, Zoom3, Zoom4 etc. Obviously
the code above doesn't work, so how can I modify it so that it is able
to set e.g. ZoomArray(5) = .Zoom5

Thanks and regards,

Tom
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
Looping with incremental variable/object names Charles Hamlyn Excel Programming 3 January 29th 07 08:14 PM
Object Variable Not Set Error on Selection object Jean Excel Worksheet Functions 3 July 24th 06 06:45 PM
Run-time Error'91: Object variable or With block variable not set DynamiteSkippy Excel Programming 4 September 26th 05 07:47 AM
Run-time error '91': "Object variable or With block variable not set Mike[_92_] Excel Programming 2 December 30th 04 10:59 AM
Cells.Find error Object variable or With block variable not set Peter[_21_] Excel Programming 2 May 8th 04 02:15 PM


All times are GMT +1. The time now is 03:42 PM.

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"