ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   error message (https://www.excelbanter.com/excel-discussion-misc-queries/97588-error-message.html)

Jeff

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.

JLatham

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.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com