1

Topic: Too a considerable quantity of elements in an array

The program works well, when an amount of elements in an array equally 109. But it is necessary for me 174. When I write down 174 el line
[spoiler]

F = Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40 "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113")

becomes red and produces error Syntax Error. How to be in such situation?

Sub óäàëèòü ()
Dim book1 As Workbook
Dim B As String
Dim v As Long
Dim e As Long
Dim F
Application. ScreenUpdating = False
Application. Calculation = xlCalculationManual
Application. EnableEvents = False
F = Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40 "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109")
For t = 61 To 88
Set book1 = Workbooks. Open ("E:\Super M\Ïðîåêò ñòàâêè \Ïîèñê ðåøåíèÿ \Óñîâ 7\âñïîìîãàòåëüíûå ïðîãðàììû \3 ñåçîíà \áîëâàíêà \" AND F (t) AND ".xlsm")
For v = 1 To 14
book1.Worksheets ("Ëèñò" AND v).Cells (34, 1).Resize (200, 6).ClearContents
Next v
book1.Save
book1.Close
Next t
Application. ScreenUpdating = True
Application. Calculation = xlCalculationAutomatic
Application. EnableEvents = True
End Sub

[/spoiler]

2

Re: Too a considerable quantity of elements in an array

maxim863;
Try to break a line on some:

f = Array ("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "21", _
"22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", _
"63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113")

3

Re: Too a considerable quantity of elements in an array

But where it would be easier to write down these numbers on sheet in cells and therefrom to read out.

4

Re: Too a considerable quantity of elements in an array

Yes to fill in a cycle,  mine...

5

Re: Too a considerable quantity of elements in an array

And what for generally the array is necessary, if it is known, what F (t) =t+1? [code] [code]
For t = 61 To 88
Set book1 = Workbooks. Open ("E: \something there \" both t+1 and ".xlsm")
[/code] [/code]

6

Re: Too a considerable quantity of elements in an array

The Kazan;
Thanks. So is easier

7

Re: Too a considerable quantity of elements in an array

Enumerable. Range (1, 128).Select (p => p. ToString ()).ToArray ()

8

Re: Too a considerable quantity of elements in an array

maxim863;

Dim arSrc As Variant, arRes As Variant
Range ("A1").Value = 1
Range ("A1").DataSeries Rowcol: = xlColumns, Type: = xlLinear, Step: = 1, Stop: = 174
arSrc = Range ("A1:A174").Value
arRes = Application. Transpose (Application. WorksheetFunction. Index (arSrc, 0, 0))

9

Re: Too a considerable quantity of elements in an array

big-duke;
It is not necessary to touch sheet smile

arRes = [TRANSPOSE (ROW (1:174))]

However, it works only at style of links 1. For any style of links

If Application. ReferenceStyle = xlA1 Then arRes = [TRANSPOSE (ROW (1:174))] Else arRes = [TRANSPOSE (ROW (R1:R174))]

10

Re: Too a considerable quantity of elements in an array

The Kazan;
[TRANSPONSE] it is call Application. Transpose?