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: 1
Default Excel VBA & Arrays

I can't get the following procedure to work... according to the help files,
it should work but doesn't. I get a "Compile error: Can't assign to array"
when vColumns = Array("A", "B", ...). Does anyone know why and how to fix?
Thanks! :-)

Public Sub Suffy()

Dim vColumns(6) As Variant
Dim i As Integer
vColumns = Array("A", "B", "C", "D", "E", "F", "G")

For i = 1 To 7 Step 1
Debug.Print sColumns(i)
Next i

End Sub


 
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
Working with ranges in arrays... or an introduction to arrays Glen Excel Programming 5 September 10th 06 08:32 AM
Arrays - declaration, adding values to arrays and calculation Maxi[_2_] Excel Programming 1 August 17th 06 04:13 PM
excel arrays kenrock[_2_] Excel Programming 6 November 12th 05 11:36 AM
arrays in excel Dan Excel Worksheet Functions 9 May 24th 05 07:01 PM
Arrays in Excel VBA Eliezer Excel Programming 4 September 3rd 04 08:37 PM


All times are GMT +1. The time now is 11:24 AM.

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"