Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
y y is offline
external usenet poster
 
Posts: 60
Default Application.WorksheetFunction.Upper

Function Test(Classe, osserv As Range, Dst As String, ParA, ParB) As Single
....
Dist as string
....
Dist = Application.WorksheetFunction.Upper(Dst)
....

executing the "Dist = ..." statement VBA stops abnormally (without any message)

Have you encountered this problem?

Alex.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Application.WorksheetFunction.Upper

According to help, that's not included in the worksheet functions available
to VBA. Use the VBA function Ucase.

hth,

Doug

"y" wrote in message ...
Function Test(Classe, osserv As Range, Dst As String, ParA, ParB) As

Single
...
Dist as string
...
Dist = Application.WorksheetFunction.Upper(Dst)
...

executing the "Dist = ..." statement VBA stops abnormally (without any

message)

Have you encountered this problem?

Alex.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Application.WorksheetFunction.Upper

Hi
use
Dist = UCase(Dist)

--
Regards
Frank Kabel
Frankfurt, Germany

"y" schrieb im Newsbeitrag
...
Function Test(Classe, osserv As Range, Dst As String, ParA, ParB) As

Single
...
Dist as string
...
Dist = Application.WorksheetFunction.Upper(Dst)
...

executing the "Dist = ..." statement VBA stops abnormally (without

any message)

Have you encountered this problem?

Alex.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Application.WorksheetFunction.Upper

Alex,

"Upper" is not part of the Excel Object Model particularly the
Application.WorksheetFunctions object.

However, VBA's UCase should work fine for you:

dist = UCase$(dst)


NOTE: While your in any VB editor you can hit "F2" for the Object Browser.
Here, you can search for any command like "Upper" ro "UCase".


Sonny Kocak
Microsoft Developer Community Support
Email :

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| Date: Tue, 06 Apr 2004 21:53:44 +0200
| From: y
| User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4)
Gecko/20030624
| X-Accept-Language: en-us, en
| MIME-Version: 1.0
| Subject: Application.WorksheetFunction.Upper
| Content-Type: text/plain; charset=us-ascii; format=flowed
| Content-Transfer-Encoding: 7bit
| Message-ID:
| Newsgroups: microsoft.public.excel.programming
| NNTP-Posting-Host: ppp-121-118.98-62.inwind.it 62.98.118.121
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.excel.programming:484443
| X-Tomcat-NG: microsoft.public.excel.programming
|
| Function Test(Classe, osserv As Range, Dst As String, ParA, ParB) As
Single
| ...
| Dist as string
| ...
| Dist = Application.WorksheetFunction.Upper(Dst)
| ...
|
| executing the "Dist = ..." statement VBA stops abnormally (without any
message)
|
| Have you encountered this problem?
|
| Alex.
|
|

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default Application.WorksheetFunction.Upper

Sonny Kocak[MSFT] wrote

dist = UCase$(dst)


What is the difference between UCase$ and UCase

--
David


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Application.WorksheetFunction.Upper

David,

What is the difference between UCase$ and UCase


UCase$ (and all string related functions that end in '$') returns a String
type result, while UCase (and string related functions that do not end in
'$') return Variant data types. The '$' functions are more efficient because
the compiler does not need to emit instructions to extract the string data
out of the Variant.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"David" wrote in message
...
Sonny Kocak[MSFT] wrote

dist = UCase$(dst)


What is the difference between UCase$ and UCase

--
David



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default Application.WorksheetFunction.Upper

Chip Pearson wrote

UCase$ (and all string related functions that end in '$') returns a
String type result, while UCase (and string related functions that do
not end in '$') return Variant data types. The '$' functions are more
efficient because the compiler does not need to emit instructions to
extract the string data out of the Variant.


Thanks for the explanation.

--
David
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
Reuse Application.WorksheetFunction jlclyde Excel Discussion (Misc queries) 4 March 12th 09 08:32 PM
Application.WorksheetFunction error Ayo Excel Discussion (Misc queries) 4 May 16th 08 05:04 PM
Need help with Application.WorksheetFunction Ayo Excel Discussion (Misc queries) 4 May 14th 08 11:13 PM
application.worksheetfunction.mmult help Alex[_13_] Excel Programming 2 October 29th 03 10:13 PM
Using Application.WorksheetFunction.Ln(...) in VBA doco Excel Programming 4 August 25th 03 01:08 PM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"