Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Hi! I made an add in for excel 2000 on my pc. In the add in I'm using or
simply declaring functions inside a DLL using VBA. The DLL and add in work
just fine on my own computer but when I try to use them on another similar
system(excel 2000) the add in stops working and shows the error report
"#VALUE!" for every result on any function. Is there something I am missing
or is it possible to distribute this kind of add in to other pcs? Thank you
for any comments regarding my problem!

-Janne Ervasti
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Add in doesn't work on other pc

did you distribute the DLL and register it on that machine with Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm using or
simply declaring functions inside a DLL using VBA. The DLL and add in work
just fine on my own computer but when I try to use them on another similar
system(excel 2000) the add in stops working and shows the error report
"#VALUE!" for every result on any function. Is there something I am missing
or is it possible to distribute this kind of add in to other pcs? Thank you
for any comments regarding my problem!

-Janne Ervasti

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on the
other PC's system32 folder. I also tried putting it into another folder and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's only
a plain basic DLL that I made with VC++ and includes only the functions I
need plus the Dllmain entry point? Isn't this only the case with ActiveX DLLs
and such? My DLL doesn't even include the function srvreg32 is looking for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm using or
simply declaring functions inside a DLL using VBA. The DLL and add in work
just fine on my own computer but when I try to use them on another similar
system(excel 2000) the add in stops working and shows the error report
"#VALUE!" for every result on any function. Is there something I am missing
or is it possible to distribute this kind of add in to other pcs? Thank you
for any comments regarding my problem!

-Janne Ervasti

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Add in doesn't work on other pc

If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on the
other PC's system32 folder. I also tried putting it into another folder

and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's

only
a plain basic DLL that I made with VC++ and includes only the functions I
need plus the Dllmain entry point? Isn't this only the case with ActiveX

DLLs
and such? My DLL doesn't even include the function srvreg32 is looking for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm using

or
simply declaring functions inside a DLL using VBA. The DLL and add in

work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error report
"#VALUE!" for every result on any function. Is there something I am

missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Add in doesn't work on other pc

Ignore the bit about calling convention, as I missed the bit that you had it
working on your PC.
However, post a couple of Declares.

NickHK
P.S. I have seen this if your DLL has a/some dependencies missing and
consequently can't load.
Check that all the files your DLL requires are present on the new PC.

"NickHK" wrote in message
...
If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on

the
other PC's system32 folder. I also tried putting it into another folder

and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's

only
a plain basic DLL that I made with VC++ and includes only the functions

I
need plus the Dllmain entry point? Isn't this only the case with ActiveX

DLLs
and such? My DLL doesn't even include the function srvreg32 is looking

for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path

in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm

using
or
simply declaring functions inside a DLL using VBA. The DLL and add

in
work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error

report
"#VALUE!" for every result on any function. Is there something I am

missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Hello Nick!

In the code for my DLL functions are declared with:

extern "C" int __stdcall function1(int variable1)
{
//code...
}

After this I have included it in my .def file with:

LIBRARY "functions"
EXPORTS
function1 @1

Then I built the DLL and wrote the following in VBA:

Option Explicit

Public Declare Function my_function Lib "functions.dll" Alias "function1" _
(ByVal var1 As Integer) As Integer

After which I saved the workbook containing my module of code with the
function declarations as an .xla add in file.

Once doing this I distributed the add in and DLL to another PC but I am not
able to get the same correct behaviour there as on my own PC.

-Janne Ervasti

"NickHK" wrote:

If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on the
other PC's system32 folder. I also tried putting it into another folder

and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's

only
a plain basic DLL that I made with VC++ and includes only the functions I
need plus the Dllmain entry point? Isn't this only the case with ActiveX

DLLs
and such? My DLL doesn't even include the function srvreg32 is looking for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm using

or
simply declaring functions inside a DLL using VBA. The DLL and add in

work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error report
"#VALUE!" for every result on any function. Is there something I am

missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Add in doesn't work on other pc

I'm no expert on this stuff, but AFAIK, a C int is a VB Long.
But if it works on your PC then I doubt that is problem, but you may not get
your expect numbers back in VBA.
I'd say it would be trouble with the path and/or dependencies.

NickHK

"yanne" wrote in message
...
Hello Nick!

In the code for my DLL functions are declared with:

extern "C" int __stdcall function1(int variable1)
{
//code...
}

After this I have included it in my .def file with:

LIBRARY "functions"
EXPORTS
function1 @1

Then I built the DLL and wrote the following in VBA:

Option Explicit

Public Declare Function my_function Lib "functions.dll" Alias "function1"

_
(ByVal var1 As Integer) As Integer

After which I saved the workbook containing my module of code with the
function declarations as an .xla add in file.

Once doing this I distributed the add in and DLL to another PC but I am

not
able to get the same correct behaviour there as on my own PC.

-Janne Ervasti

"NickHK" wrote:

If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on

the
other PC's system32 folder. I also tried putting it into another

folder
and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if

it's
only
a plain basic DLL that I made with VC++ and includes only the

functions I
need plus the Dllmain entry point? Isn't this only the case with

ActiveX
DLLs
and such? My DLL doesn't even include the function srvreg32 is looking

for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole

path in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm

using
or
simply declaring functions inside a DLL using VBA. The DLL and add

in
work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error

report
"#VALUE!" for every result on any function. Is there something I

am
missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Hey Nick,

I tried exporting the whole project directory of my DLL from my own PC and
including the path to the DLL in there in the VBA on another PC but still got
no better results. I couldn't think of any other reasonable way of exporting
all of the libraries I used when making the DLL but please tell me if there
was some other way you were thinking.

The declarations I wrote earlier are the formulas for all of the functions I
have declared in both VC++ and VBA. All of the functions give the same error
result in Excel once they are called.

Best Regards,
Janne Ervasti

"NickHK" wrote:

Ignore the bit about calling convention, as I missed the bit that you had it
working on your PC.
However, post a couple of Declares.

NickHK
P.S. I have seen this if your DLL has a/some dependencies missing and
consequently can't load.
Check that all the files your DLL requires are present on the new PC.

"NickHK" wrote in message
...
If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on

the
other PC's system32 folder. I also tried putting it into another folder

and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's

only
a plain basic DLL that I made with VC++ and includes only the functions

I
need plus the Dllmain entry point? Isn't this only the case with ActiveX

DLLs
and such? My DLL doesn't even include the function srvreg32 is looking

for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path

in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm

using
or
simply declaring functions inside a DLL using VBA. The DLL and add

in
work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error

report
"#VALUE!" for every result on any function. Is there something I am

missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Yes, you are right. The int was supposed to be a 16-bit unsigned short int.

-Janne

"NickHK" wrote:

I'm no expert on this stuff, but AFAIK, a C int is a VB Long.
But if it works on your PC then I doubt that is problem, but you may not get
your expect numbers back in VBA.
I'd say it would be trouble with the path and/or dependencies.

NickHK

"yanne" wrote in message
...
Hello Nick!

In the code for my DLL functions are declared with:

extern "C" int __stdcall function1(int variable1)
{
//code...
}

After this I have included it in my .def file with:

LIBRARY "functions"
EXPORTS
function1 @1

Then I built the DLL and wrote the following in VBA:

Option Explicit

Public Declare Function my_function Lib "functions.dll" Alias "function1"

_
(ByVal var1 As Integer) As Integer

After which I saved the workbook containing my module of code with the
function declarations as an .xla add in file.

Once doing this I distributed the add in and DLL to another PC but I am

not
able to get the same correct behaviour there as on my own PC.

-Janne Ervasti

"NickHK" wrote:

If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on

the
other PC's system32 folder. I also tried putting it into another

folder
and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if

it's
only
a plain basic DLL that I made with VC++ and includes only the

functions I
need plus the Dllmain entry point? Isn't this only the case with

ActiveX
DLLs
and such? My DLL doesn't even include the function srvreg32 is looking

for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole

path in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with
Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm

using
or
simply declaring functions inside a DLL using VBA. The DLL and add

in
work
just fine on my own computer but when I try to use them on another
similar
system(excel 2000) the add in stops working and shows the error

report
"#VALUE!" for every result on any function. Is there something I

am
missing
or is it possible to distribute this kind of add in to other pcs?
Thank you
for any comments regarding my problem!

-Janne Ervasti






  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Add in doesn't work on other pc

Hello,

finally I got it working on other PCs. The problem doesn't seem to be in the
code but it seems more like a problem the development environment or the
settings of the development environment. When I first built the DLL I made in
Visual Studio 2005 and .NET framework version 2.0.5.0727(running on Windows
2000 with Excel 2000). These DLLs would not work on other PCs. After this we
tried developing corresponding DLL on other system setups. Building the DLL
on an older version of VC++ which was on Visual Studio 2003 seemed to produce
DLL files that were bigger in size and also worked on other PCs and at least
on Excel 2000 and 2003. The problem seems to be the interface the DLL is
providing for Excel to call. Maybe different .NET environments give different
results on the final DLLs. Still I don't know the exact reason for why my own
PCs DLL would not work on other PCs but for now I would blame it on the new
..NET. ;) If anybody has any idea please let me know.

BR,
Janne

"NickHK" wrote:

Ignore the bit about calling convention, as I missed the bit that you had it
working on your PC.
However, post a couple of Declares.

NickHK
P.S. I have seen this if your DLL has a/some dependencies missing and
consequently can't load.
Check that all the files your DLL requires are present on the new PC.

"NickHK" wrote in message
...
If this was created in in VC++, which calling convention is used.
VB/VBA only supports __stdcall not __cdecl.
http://www.codeproject.com/dll/dll_calling.asp

Show a sample of you Declares.

NickHK

"yanne" wrote in message
...
Hey Tom,

Thank you for your quick answer! I have distributed the DLL as well on

the
other PC's system32 folder. I also tried putting it into another folder

and
including its path in the VBA code but it wouldn't work.

Does the DLL really need to be registered on the other computer if it's

only
a plain basic DLL that I made with VC++ and includes only the functions

I
need plus the Dllmain entry point? Isn't this only the case with ActiveX

DLLs
and such? My DLL doesn't even include the function srvreg32 is looking

for
when registering.

I tried to register my DLL with the srvreg32 but for some reason it
complains about not finding the dll eventhough I include the whole path

in
the command.

Best Regards,
Janne Ervasti

"Tom Ogilvy" wrote:

did you distribute the DLL and register it on that machine with

Regsvr32?

--
Regards,
Tom Ogilvy


"yanne" wrote:

Hi! I made an add in for excel 2000 on my pc. In the add in I'm

using
or
simply declaring functions inside a DLL using VBA. The DLL and add

in
work
just fine on my own computer but when I try to use them on another

similar
system(excel 2000) the add in stops working and shows the error

report
"#VALUE!" for every result on any function. Is there something I am

missing
or is it possible to distribute this kind of add in to other pcs?

Thank you
for any comments regarding my problem!

-Janne Ervasti






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
Macro to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
how can i automatically generate work order numbers from work orde rob h Excel Discussion (Misc queries) 1 July 13th 09 07:59 PM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 04:03 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"