Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
command not found when using excel VBA function format
I have an extensive piece of VBA code that use the format function. The
macros run on my development machine and on one other in building. I tried to use the code on an additional computer and got a command not found error. I am assuming that means that there is some file missing on that computer. Can anyone suggest what the specific fiel might be? Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
command not found when using excel VBA function format
On 7 dec, 19:40, OHCQ_DB wrote:
I have an extensive piece of VBA code that use the format function. *The macros run on my development machine and on one other in building. *I tried to use the code on an additional computer and got a command not found error. * I am assuming that means that there is some file missing on that computer.. * Can anyone suggest what the specific fiel might be? Thank you Hi OHCQ_DB On one of the machines the project does work: Load de file Open the VBE ([Alt]+[F11]) Click Tools -- References. All needed / used extra files are listed here. Copy the filenames On one of the machines the project is not working: do the same and check if one is missing There should be a marking with "MISSIING" in the list. Hoop This Help, Radareye |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
command not found when using excel VBA function format
Every VBA project requires references to external libraries. At a
minimum, you need references to VBA, OLE, Office, and Excel. You can safely assume these will be in place on any machine running a compatible version of Excel. However, if your project requires other libraries, it is not safe to assume that these will exist on another machine. If a required library cannot be found on the machine on which the code is to be run, you can get odd errors, such as the compiler complaining that some fundamental VBA function (e.g. Left) cannot be found. This can be confusing because the library that contains the bitched at command (eg., Left, defined in the VBA typelib) is clearly in place. The absence of one library can cause the compiler to complain about functions defined in other libraries. On the machine that is exhibiting the problems, open the workbook and then open the VBA editor. There, go to the Tools menu, choose References, and look for any reference(s) marked as "MISSING". If a library is missing, you can do one of two things. If you don't really need the library, you can uncheck it and forget about it. If you do in fact need the library, you'll need to copy the library file from a well working machine (assuming you have the legal right to copy and distribute the file) to the machine that has the problems. Once copied, you'll likely need to register the library with Windows. Close out Excel, go to the Windows Start menu, choose Run, and enter the following, including the quotes as shown. Of course, use the appropriate file path to the file name. RegSvr32 "C:\Path\To\File\Filename.dll" /u Then, do the same thing but without the /u switch: RegSvr32 "C:\Path\To\File\Filename.dll" Now, restart Excel and open the workbook. If you are not able to copy the requisite library to the problematic machine, then your workbook, as is, cannot be used on that machine. If you have access to a real installation file builder, such as InstallShield, Setup Factory, or Advanced Installer, you can create a setup and deployment project that will automatically copy the required libraries to the the user's machine and register those libraries with Windows. Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web site] On Mon, 7 Dec 2009 10:40:02 -0800, OHCQ_DB wrote: I have an extensive piece of VBA code that use the format function. The macros run on my development machine and on one other in building. I tried to use the code on an additional computer and got a command not found error. I am assuming that means that there is some file missing on that computer. Can anyone suggest what the specific fiel might be? Thank you |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
command not found when using excel VBA function format
Can you tell us the line that the error occurs on?
"OHCQ_DB" wrote: I have an extensive piece of VBA code that use the format function. The macros run on my development machine and on one other in building. I tried to use the code on an additional computer and got a command not found error. I am assuming that means that there is some file missing on that computer. Can anyone suggest what the specific fiel might be? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to highlight a found excel cell when doing the find command? | Excel Discussion (Misc queries) | |||
Format Cell command will not function | Excel Discussion (Misc queries) | |||
Fibonacci function/command in excel?...tia sal | Excel Programming | |||
Fibonacci function/command in excel?...tia sal | Excel Worksheet Functions | |||
Fibonacci function/command in excel?...tia sal | Excel Discussion (Misc queries) |