Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default The TEXT function in Excel VBA 2000

When using the TEXT function I get the following message:

"Compile Error: Sub or Function not defined" It is
supposed to be a built in function such as Left$ or
Instr. It is in the help. If you can go to help, type in
functions and a list of all VBA functions come up click
on T then go to the TEXT function. I tried to duplicate
the example but still get the message about Sub or
Function not defined.

Call me if you care to

Tory
(714) 638-5714
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default The TEXT function in Excel VBA 2000

In The VB Editor, go to the Tools menu, select References. Look at the list.
Are there any marked as missing? If so, you need to either un-check them (if
you don't need them), or use the Browse button to find them.

If there are any libraries marked as "missing", your code won't compile.

On Mon, 27 Sep 2004 20:45:31 -0700, "Tory Zimmerman"
wrote:

When using the TEXT function I get the following message:

"Compile Error: Sub or Function not defined" It is
supposed to be a built in function such as Left$ or
Instr. It is in the help. If you can go to help, type in
functions and a list of all VBA functions come up click
on T then go to the TEXT function. I tried to duplicate
the example but still get the message about Sub or
Function not defined.

Call me if you care to

Tory
(714) 638-5714


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default The TEXT function in Excel VBA 2000

Tory,
"TEXT" is an Excel worksheet function. As such VBA does not know what it
means unless you use:
Excel.WorksheetFunctions.Text

Hope that helps

NickHK

"Tory Zimmerman" wrote in message
...
When using the TEXT function I get the following message:

"Compile Error: Sub or Function not defined" It is
supposed to be a built in function such as Left$ or
Instr. It is in the help. If you can go to help, type in
functions and a list of all VBA functions come up click
on T then go to the TEXT function. I tried to duplicate
the example but still get the message about Sub or
Function not defined.

Call me if you care to

Tory
(714) 638-5714



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default The TEXT function in Excel VBA 2000

msgbox application.text(123.53,"0.00%")
worked ok.

but depending on what you're doing, maybe VBA's Format is what you want:
msgbox format(123.53,"0.00%")

(there are a few formats that aren't shared between these similar functions.)


Tory Zimmerman wrote:

When using the TEXT function I get the following message:

"Compile Error: Sub or Function not defined" It is
supposed to be a built in function such as Left$ or
Instr. It is in the help. If you can go to help, type in
functions and a list of all VBA functions come up click
on T then go to the TEXT function. I tried to duplicate
the example but still get the message about Sub or
Function not defined.

Call me if you care to

Tory
(714) 638-5714


--

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
Excel 2000 versus 2003 and the TEXT Function Art H Excel Worksheet Functions 2 November 10th 06 08:43 PM
Excel 2000 Text Sabrina Excel Worksheet Functions 2 March 4th 06 12:07 AM
EXCEL 2000 AVERAGE function TREBUCHET Excel Worksheet Functions 1 August 26th 05 06:59 PM
round function in excel 2000 lots of questions Excel Worksheet Functions 2 March 4th 05 01:41 AM
IF/ LOOKUP FUNCTION - Excel 2000 Chandrashekhar Excel Worksheet Functions 3 November 5th 04 11:02 AM


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