Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
subscript out of range error
Can anyone spot why the below code is giving me an error?
Set rng = Workbooks("\\Michael\Trading\Fuel\Fuel_Data.xls"). Worksheets("Fuel Data").Range("A1935:A4000") Also, must the workbooks be open if i want to get the program to find a date and get the corresponding data? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
subscript out of range error
Hi
yes, the workbook must be open for this command -- Regards Frank Kabel Frankfurt, Germany "Darren" schrieb im Newsbeitrag ... Can anyone spot why the below code is giving me an error? Set rng = Workbooks("\\Michael\Trading\Fuel\Fuel_Data.xls"). Worksheets("Fuel Data").Range("A1935:A4000") Also, must the workbooks be open if i want to get the program to find a date and get the corresponding data? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
subscript out of range error
My worry is that the file is constantly updated. I would not want to hinder
other people when they want to update. Is there any way other way to link to the data without opening it? I have 2 columns of data on the data file. First column is dates. 2nd column, prices. On my own file here, i have the same 2 columns. I want to copy the prices, corresponding to the list of dates in my file, from data file to my file. Tricky part is that if the prices are not available, i'd want to get the next most updated price. This seems quite complex to me, and has occupied me the whole day thinking. :) Any ideas? No choice must open the data file? "Frank Kabel" wrote: Hi yes, the workbook must be open for this command -- Regards Frank Kabel Frankfurt, Germany "Darren" schrieb im Newsbeitrag ... Can anyone spot why the below code is giving me an error? Set rng = Workbooks("\\Michael\Trading\Fuel\Fuel_Data.xls"). Worksheets("Fuel Data").Range("A1935:A4000") Also, must the workbooks be open if i want to get the program to find a date and get the corresponding data? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
subscript out of range error
Maybe you could insert another worksheet (hidden) in your workbook.
All that would have on it is links to that range in the closed workbook. Then use that range in your code. Darren wrote: My worry is that the file is constantly updated. I would not want to hinder other people when they want to update. Is there any way other way to link to the data without opening it? I have 2 columns of data on the data file. First column is dates. 2nd column, prices. On my own file here, i have the same 2 columns. I want to copy the prices, corresponding to the list of dates in my file, from data file to my file. Tricky part is that if the prices are not available, i'd want to get the next most updated price. This seems quite complex to me, and has occupied me the whole day thinking. :) Any ideas? No choice must open the data file? "Frank Kabel" wrote: Hi yes, the workbook must be open for this command -- Regards Frank Kabel Frankfurt, Germany "Darren" schrieb im Newsbeitrag ... Can anyone spot why the below code is giving me an error? Set rng = Workbooks("\\Michael\Trading\Fuel\Fuel_Data.xls"). Worksheets("Fuel Data").Range("A1935:A4000") Also, must the workbooks be open if i want to get the program to find a date and get the corresponding data? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error:Subscript out of range | Excel Discussion (Misc queries) | |||
Subscript out of range error | Excel Discussion (Misc queries) | |||
Subscript Out Of Range Error? | Excel Programming | |||
Subscript out of range error | Excel Programming | |||
Subscript out of range error | Excel Programming |