Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving custom toolbars with macros to work on other computers | Excel Discussion (Misc queries) | |||
Why does copy after worksheets command not work on some computers | Excel Programming | |||
How can I link excel spreadsheets that work on other computers | Excel Discussion (Misc queries) | |||
What program would work better? | Excel Discussion (Misc queries) | |||
Formula won't work on some computers | Excel Programming |