ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Program won't work on all computers (https://www.excelbanter.com/excel-programming/377037-re-program-wont-work-all-computers.html)

[email protected]

Program won't work on all computers
 
Hey everyone,

I just spend a few weeks writing a program that will work on my PC but
not anywhere else.

I get a compile error which is forcing me to "Dim" all of my variables
to get to the next compiling error statement.

I check the options to make sure that I didn't have the "required
defining of variables" checkbox checked, and it still won't work.

Simple functions like Time() are not recoginzed and state that the
object or libarary is not found, but when I check the references all
the same references are checked.

What the heck is going on? Any suggestions?


Jim Thomlinson

Program won't work on all computers
 
A couple of things. Check "Require Variable Declarations" just writes Option
Explicit at the beginning of each module. That is the compiler directive that
requires all varaibles to be declared. So even if you have that checked, if
the words Option Explicit are not at the top of themodule then variable
declarations are not required. That being said you should ALWAYS have Option
Explicit at the top of each module. There is no excuse for not declaring
variables...

Now to your problem... I would give it a 99.9% Chance that you have a
missing reference. When you go to one of the machies that does not work, if
you open up tools - references you will almost certainly find a reference
tagged Missing:
--
HTH...

Jim Thomlinson


" wrote:

Hey everyone,

I just spend a few weeks writing a program that will work on my PC but
not anywhere else.

I get a compile error which is forcing me to "Dim" all of my variables
to get to the next compiling error statement.

I check the options to make sure that I didn't have the "required
defining of variables" checkbox checked, and it still won't work.

Simple functions like Time() are not recoginzed and state that the
object or libarary is not found, but when I check the references all
the same references are checked.

What the heck is going on? Any suggestions?



digitalsigma

Program won't work on all computers
 
Jim,

I did pull up the References for a different machine and I noticed that
one of the references said "MISSING:". But the reference is for Active
X components, which to me should not interfer with the Time() function.

Will one missing reference crash my program?? That would suck.

I will have IT update the references for the machines I plan to use and
I will test.

Thanks Jim.


Jim Thomlinson wrote:
A couple of things. Check "Require Variable Declarations" just writes Option
Explicit at the beginning of each module. That is the compiler directive that
requires all varaibles to be declared. So even if you have that checked, if
the words Option Explicit are not at the top of themodule then variable
declarations are not required. That being said you should ALWAYS have Option
Explicit at the top of each module. There is no excuse for not declaring
variables...

Now to your problem... I would give it a 99.9% Chance that you have a
missing reference. When you go to one of the machies that does not work, if
you open up tools - references you will almost certainly find a reference
tagged Missing:
--
HTH...

Jim Thomlinson


" wrote:

Hey everyone,

I just spend a few weeks writing a program that will work on my PC but
not anywhere else.

I get a compile error which is forcing me to "Dim" all of my variables
to get to the next compiling error statement.

I check the options to make sure that I didn't have the "required
defining of variables" checkbox checked, and it still won't work.

Simple functions like Time() are not recoginzed and state that the
object or libarary is not found, but when I check the references all
the same references are checked.

What the heck is going on? Any suggestions?




digitalsigma

Program won't work on all computers
 
Got it up and working like a charm....Thanks a million


digitalsigma wrote:
Jim,

I did pull up the References for a different machine and I noticed that
one of the references said "MISSING:". But the reference is for Active
X components, which to me should not interfer with the Time() function.

Will one missing reference crash my program?? That would suck.

I will have IT update the references for the machines I plan to use and
I will test.

Thanks Jim.


Jim Thomlinson wrote:
A couple of things. Check "Require Variable Declarations" just writes Option
Explicit at the beginning of each module. That is the compiler directive that
requires all varaibles to be declared. So even if you have that checked, if
the words Option Explicit are not at the top of themodule then variable
declarations are not required. That being said you should ALWAYS have Option
Explicit at the top of each module. There is no excuse for not declaring
variables...

Now to your problem... I would give it a 99.9% Chance that you have a
missing reference. When you go to one of the machies that does not work, if
you open up tools - references you will almost certainly find a reference
tagged Missing:
--
HTH...

Jim Thomlinson


" wrote:

Hey everyone,

I just spend a few weeks writing a program that will work on my PC but
not anywhere else.

I get a compile error which is forcing me to "Dim" all of my variables
to get to the next compiling error statement.

I check the options to make sure that I didn't have the "required
defining of variables" checkbox checked, and it still won't work.

Simple functions like Time() are not recoginzed and state that the
object or libarary is not found, but when I check the references all
the same references are checked.

What the heck is going on? Any suggestions?





All times are GMT +1. The time now is 12:09 AM.

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