Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default 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
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to highlight a found excel cell when doing the find command? dc Excel Discussion (Misc queries) 0 December 4th 08 09:43 PM
Format Cell command will not function Phil Excel Discussion (Misc queries) 1 January 24th 08 03:47 PM
Fibonacci function/command in excel?...tia sal No Name Excel Programming 9 June 10th 05 07:27 PM
Fibonacci function/command in excel?...tia sal Excel Worksheet Functions 4 June 7th 05 06:27 PM
Fibonacci function/command in excel?...tia sal Excel Discussion (Misc queries) 1 June 7th 05 06:08 PM


All times are GMT +1. The time now is 10:37 AM.

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"