ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use External Function (https://www.excelbanter.com/excel-programming/387160-use-external-function.html)

Marvin

Use External Function
 
I want to use a function defined in one workbook within the VBA code of
another workbook.

My code looks like

b = 0
a = [personal.xls].UseIsOK(b)

but I get an error message

run time error 424

object required

The called function requires no arguments, but I get the same error message
if I use

a = [personal.xls].UseIsOK()
or
a = [personal.xls].UseIsOK

Any help would be appreciated.

Thanks.

Marvin

Tom Ogilvy

Use External Function
 

a = Application.Run( "personal.xls!UseIsOK")

--
Regards,
Tom Ogilvy



"Marvin" wrote:

I want to use a function defined in one workbook within the VBA code of
another workbook.

My code looks like

b = 0
a = [personal.xls].UseIsOK(b)

but I get an error message

run time error 424

object required

The called function requires no arguments, but I get the same error message
if I use

a = [personal.xls].UseIsOK()
or
a = [personal.xls].UseIsOK

Any help would be appreciated.

Thanks.

Marvin



All times are GMT +1. The time now is 05:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com