Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
referencing multiple controls using a variable
There may be a better way, but this works. (Color 'family' generator - the RGB part - thrown in for free :Bgr ) Public Sub dev3() Dim sName As String Dim iI As Integer For iI = 1 To 3 sName = "ListBox" & CStr(iI) ActiveSheet.OLEObjects(sName).Object.BackColor = RGB(80 * iI, 80 * 11, 80 * (3 - iI)) Next iI End Sub -- jamescox ------------------------------------------------------------------------ jamescox's Profile: http://www.thecodecage.com/forumz/member.php?userid=449 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=118933 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Referencing Controls Using Variables | Excel Programming | |||
referencing forms controls | Excel Programming | |||
Referencing worksheet controls | Excel Programming | |||
Excel 2003 Referencing multiple workbooks via single variable | Excel Worksheet Functions | |||
Referencing to controls on a worksheet | Excel Programming |