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: 557
Default How to Creating Array

Hi all, I got macro (see below)

Private Function LabelNormal()
On Error Resume Next
Dim ctl As Control


For Each ctl In Me.Controls
If TypeOf ctl Is Label And ctl.Name < "Label10" And ctl.Name <
"Label9" Then
With ctl
.SpecialEffect = 1 'Raised
.BackColor = 8421504 'Grey
.ForeColor = 16777215 'White
.FontWeight = 400 'Normal
End With
End If
Next

End Function


the above macro fine but I want to change the line where it say
If TypeOf ctl Is Label And ctl.Name < "Label10" And ctl.Name <
"Label9" Then

to
If TypeOf ctl Is Label And ctl.Name < Array("Label10" , "Label9")
Then

I tried it but its not working. Basically I want macro to go through
all the names I put in Array and change only those controls which
names are not array. Please can any friend can help as I always had
problem creating array in macros
 
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
Creating an array [email protected] Excel Programming 6 July 15th 07 09:47 PM
creating an array Richard Excel Programming 4 March 15th 07 01:06 PM
Creating and using an array John Ortt Excel Programming 2 August 23rd 06 11:18 AM
creating an array on the fly Gary Keramidas Excel Programming 4 August 9th 06 09:34 PM
Creating an array Eric[_6_] Excel Programming 1 January 12th 04 08:25 PM


All times are GMT +1. The time now is 07:13 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"