View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Is there a test for an empty string that returns a boolean?

On Fri, 09 May 2008 19:01:36 +0100, "Dave F." wrote:

Hi

I'm passing the ElevCptn parameter as Optional:

Private Sub SetOptBut(FontBack As Boolean, PlnCptn As String, Optional
ElevCptn As String)

I want to test to see if the parameter has been included & Enable a
button if it is, & Disable it if is isn't, so I'd like it to return a
boolean.

Something like this:
CboElevation.Enabled = IsEmpty(ElevCptn)

Except that doesn't work because "" isn't an empty string.

Any help is appreciated

Ta
Dave F.


how about Len(ElevCptn) = 0

--ron