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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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.



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
very complex IF function if not an alternative function of crossselection Daniel Miz Excel Worksheet Functions 0 March 25th 11 10:03 PM
Excel 2007: complex COUNTIFS() David Aukerman[_2_] Excel Worksheet Functions 9 January 18th 11 06:35 PM
complex function Alain R. Excel Programming 4 July 30th 06 12:12 AM
Use Excel to make a complex IF function. Jason Excel Worksheet Functions 3 May 2nd 06 04:49 PM
complex excel formula Array how do I convert it to a vba Function Rob Excel Worksheet Functions 1 April 10th 06 07:06 PM


All times are GMT +1. The time now is 08:11 PM.

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"