EccentricBadger
Technical User
Hi,
What im trying to do is use some VBA to create a chart based upon an output file, that has already been generated and is loaded into Excel. The file lists numbers and the names of various ships and their positions.
Currently it does generate a correct chart when there are sequentially numbered ships. The problem is when they are not sequentially number. I have created a list of the ship numbers based in an array where the maximum is the total number of ships. For example i have 6 ship types but they are numbered 1,2,3,4,5,8.
I used the various arrays to take the ship number and name and use that to create a name for the series in a chart. This works on the sequential files, but not on the stated example. The error i get is when i try and name the final series, ( in the above case 6, and number 8 as the ship number) 'Runtime error 1004' 'Unable to set the Name property of the Series'.
Any ideas?
What im trying to do is use some VBA to create a chart based upon an output file, that has already been generated and is loaded into Excel. The file lists numbers and the names of various ships and their positions.
Currently it does generate a correct chart when there are sequentially numbered ships. The problem is when they are not sequentially number. I have created a list of the ship numbers based in an array where the maximum is the total number of ships. For example i have 6 ship types but they are numbered 1,2,3,4,5,8.
I used the various arrays to take the ship number and name and use that to create a name for the series in a chart. This works on the sequential files, but not on the stated example. The error i get is when i try and name the final series, ( in the above case 6, and number 8 as the ship number) 'Runtime error 1004' 'Unable to set the Name property of the Series'.
Any ideas?