Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using an excel built in function in a Macro

This is problably a very basic question, How do I use an excel built in
functtion, such as CONCATENATE(), in my own macro?

Thank You
  #2   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Using an excel built in function in a Macro

Either

Application.Worksheetfunction.Count(.....)
Application.Count(....)
Worksheetfunction.Count(....)

But I don't think Concatenate is available. You could just use &

"abc" & "123"



"Yehuda" wrote:

This is problably a very basic question, How do I use an excel built in
functtion, such as CONCATENATE(), in my own macro?

Thank You

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Using an excel built in function in a Macro

Hi,

I've seen Concatenate in Excel builtin formula...
so you can use :
Application.Concatenate("abc"&"123")
to joining text with vba code

or use:
"abc" & "123"
like JMB wrote...

--

Regards,

Halim


"JMB" wrote:

Either

Application.Worksheetfunction.Count(.....)
Application.Count(....)
Worksheetfunction.Count(....)

But I don't think Concatenate is available. You could just use &

"abc" & "123"



"Yehuda" wrote:

This is problably a very basic question, How do I use an excel built in
functtion, such as CONCATENATE(), in my own macro?

Thank You

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Using an excel built in function in a Macro

On Sun, 29 Apr 2007 22:42:01 -0700, Halim
wrote:

I've seen Concatenate in Excel builtin formula...
so you can use :
Application.Concatenate("abc"&"123")
to joining text with vba code



Did you try this code?

It does not work in VBA with Excel 2003, on my machine, and, as JMB wrote,
CONCATENATE is not listed as a Worksheet Function available to Visual Basic.
--ron
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Using an excel built in function in a Macro

For the equivalent of the worksheet function =concatenate(), you'd want to use
VBA's & operator.

But for other worksheet functions that can't be used in VBA (and don't have
equivalent functions in VBA), you could use something like:

Dim myStr As String
myStr = Application.Evaluate("Concatenate(""hi"", "" "", ""there"")")
MsgBox myStr

Again, don't use this kind of thing for =concatenate().

Yehuda wrote:

This is problably a very basic question, How do I use an excel built in
functtion, such as CONCATENATE(), in my own macro?

Thank You


--

Dave Peterson
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
Sqr built-in function in Excel 2003 VBA DaleB Excel Discussion (Misc queries) 4 October 22nd 07 05:15 PM
Modifying built in document properties using an excel macro Rakshit Excel Programming 3 November 3rd 06 06:43 AM
Can I use Word built-in dialog in Excel macro? Bracha Excel Programming 3 August 10th 06 05:36 AM
Use An Excel Built-In Function Entirely Within VBA MDW Excel Programming 3 February 23rd 06 10:03 PM
How can I build a Excel Function that acts like those built-in wlh Excel Programming 1 November 27th 03 08:18 AM


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