Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
error message
Hi,
I get the error message "Variable uses an Automation type not supported in visual basic" For i = 1 To (100 - IAGE) x=xt(i) Next i But this type of logic has worked before. Do I need to declare the variable i. IAGE is declared as a double. Excel 97 Thanks for your help. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
error message
You don't HAVE to declare variables before use unless you see
Option Explicit at the top of the module - that requires all to be declared before use. What is the value of IAGE? If it is larger than 100, then the result of (100-IAGE) will be negative and that could be a problem. To count in reverse, as from 1 to a negative number use: For i = 1 to (100 - IAGE) Step -1 of course then there's the question of whether or not your xt(i) array has negative array elements in it. As to the need to declare variables - I always do, and recommend it to anyone - easy way to keep typos and type mismatches from eating your shorts at run time. "Jeff" wrote: Hi, I get the error message "Variable uses an Automation type not supported in visual basic" For i = 1 To (100 - IAGE) x=xt(i) Next i But this type of logic has worked before. Do I need to declare the variable i. IAGE is declared as a double. Excel 97 Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|