![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
I'm getting an error message when running code on a different machine, the error states that it cannot load some objects on the particular machine.
It seems to be falling down on the DATE function, I have installed the analysis toolpak and the VBA toolpak. Any other suggestions of what the machine could be missing? thanks Matt |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Tab ?? In the VBA Editor > Tools > references. Have a look for any "Missing" references. If there are any with the Words "missing" then your'll need to do a search on the files. |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks Ivan, will check that
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Another suggestion, check regional settings, you may be trying to set an "incorrect" date, that works on one date system but not on another.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks Juan
I think it may be a combination of things, I will check the regional settings. In the meantime I'm missing the masked edit control. Does the machine need VB installed to use this? If so, I will replace the masks with text boxes. thanks again Matt |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
Yes, that's not a "regular" control... It could explain too why the error, "Object required".
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Sorry to push on with this one but I'm still struggling. Have resolved my object error by replacing mask controls with textbox controls. However, still having a problem with the date function.
This is a snippet of the code causing the problem. It works fine on some machines, yet falls down on others. Private Sub UserForm_Initialize() lblDate.Caption = Format(Date, "dd/mm/yyyy") Any other ideas will be much appreciated. thanks Matt |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hi Matt.
It should not matter, but try... lblDate.Caption = Format(Now, "dd/mm/yyyy") Every time I have had a problem with the Format function on another machine, it has always been a reference problem. If this is the case, the word Format would be highlighted in blue in your code pane. Tom |
|
|
|
|
|
#9 |
|
Board Regular
Join Date: Feb 2002
Location: England
Posts: 212
|
Thanks Tom
Have changed from date to now and now the "format" is highlighted. Any ideas? Thanks again Matt |
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Matt,
It's most likely what Ivan said. You are either missing a reference or you are referencing two seperate libraries which use the format function. If the latter, you will need to qualify the function by preceding it with the library name. Search "format" in your object browser and work it out. I can't really offer any more from here. I'm going by my limited experience when I had a similiar problem. Have had problems with other common functions such as left and right as well. Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|