#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,203
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"