ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Complex Function in Excel 2007 VBA (https://www.excelbanter.com/excel-programming/389537-complex-function-excel-2007-vba.html)

Adam

Complex Function in Excel 2007 VBA
 
I have a macro that I have used previously in Excel 2003. In that macro, I
use the function complex(). When I go to run the macro in Excel 2007, it
gives me an error and wants worksheetfunction.complex() instead of just
complex(). Is there a way to fix this? I don't want to have to have to go
through all my macros and change the function name. It is also doing the
same thing for improduct() or any other complex funtions. Thanks.

RB Smissaert

Complex Function in Excel 2007 VBA
 
How about:

Replace all complex() in your project with complexNew() with the Find and
replace facility.
Then make a function like this:

Function complexNew()

complexNew = Application.WorksheetFunction.Complex()

End Function


RBS



"Adam" wrote in message
...
I have a macro that I have used previously in Excel 2003. In that macro, I
use the function complex(). When I go to run the macro in Excel 2007, it
gives me an error and wants worksheetfunction.complex() instead of just
complex(). Is there a way to fix this? I don't want to have to have to
go
through all my macros and change the function name. It is also doing the
same thing for improduct() or any other complex funtions. Thanks.



RB Smissaert

Complex Function in Excel 2007 VBA
 
Actually, you might as well replace all complex() with
application.worksheetfunction.complex() with the Find and Replace.
Search whole word and case-sensitive.
Always backup before doing this.

RBS

"RB Smissaert" wrote in message
...
How about:

Replace all complex() in your project with complexNew() with the Find and
replace facility.
Then make a function like this:

Function complexNew()

complexNew = Application.WorksheetFunction.Complex()

End Function


RBS



"Adam" wrote in message
...
I have a macro that I have used previously in Excel 2003. In that macro,
I
use the function complex(). When I go to run the macro in Excel 2007, it
gives me an error and wants worksheetfunction.complex() instead of just
complex(). Is there a way to fix this? I don't want to have to have to
go
through all my macros and change the function name. It is also doing the
same thing for improduct() or any other complex funtions. Thanks.





All times are GMT +1. The time now is 01:36 PM.

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