Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Using IsBlank in VBA

Hello all,

Can I use the IsBlank worksheet function in VBA? It doesn't show up in the Application.WorksheetFunction list.

Is it part of the Analysis ToolPak? I have references in my project to "funcres" & "atpvbaen.xls" and it is still not showing up in
the list.

How do I use it, if I can?

Thanks for any help anyone can provide,

Conan Kelly


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using IsBlank in VBA


Did you try isempty()?


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=537027

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Using IsBlank in VBA

There are some different native functions for using VBA. There is IsEmpty,
IsMissing, IsNull, Is Nothing (space intended, argument), IsDate, IsNumeric,
IsArray, IsObject, IsArray, etc. The Help files have them listed fairly
well.

If you're trying to find if a cell is blank, you can always use the Len
function ..

If Len(Yourcell.value) = 0 then
msgbox "blank"
else
msgbox "not blank"
end if

HTH

--
Regards,
Zack Barresse, aka firefytr



"Conan Kelly" <CTBarbarin at msn dot com wrote in message
...
Hello all,

Can I use the IsBlank worksheet function in VBA? It doesn't show up in
the Application.WorksheetFunction list.

Is it part of the Analysis ToolPak? I have references in my project to
"funcres" & "atpvbaen.xls" and it is still not showing up in the list.

How do I use it, if I can?

Thanks for any help anyone can provide,

Conan Kelly



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Using IsBlank in VBA

Btw, (posted too quickly) there are some worksheet functions that are not
available to the VBE via App.WorksheetFunction.., just Fyi.

--
Regards,
Zack Barresse, aka firefytr



"Conan Kelly" <CTBarbarin at msn dot com wrote in message
...
Hello all,

Can I use the IsBlank worksheet function in VBA? It doesn't show up in
the Application.WorksheetFunction list.

Is it part of the Analysis ToolPak? I have references in my project to
"funcres" & "atpvbaen.xls" and it is still not showing up in the list.

How do I use it, if I can?

Thanks for any help anyone can provide,

Conan Kelly



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using IsBlank in VBA


I just realized that you might have been asking if the entire worksheet
is empty... one way to check is the following code:

Sub test()
If ActiveSheet.UsedRange.Cells.Address = "$A$1" And
ActiveSheet.Range("A1").Value = "" Then
MsgBox "Clear"
Else
MsgBox "Not Clear"
End If
End Sub


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=537027



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Using IsBlank in VBA

If that's the case, just use ..

If WorksheetFunction.CountA(Cells) = 0 Then
msgbox "empty"
Else
msgbox "has data"
End If

The way you've shown, data can be in A1 and give a false positive.

HTH

--
Regards,
Zack Barresse, aka firefytr


"Ikaabod" wrote in
message ...

I just realized that you might have been asking if the entire worksheet
is empty... one way to check is the following code:

Sub test()
If ActiveSheet.UsedRange.Cells.Address = "$A$1" And
ActiveSheet.Range("A1").Value = "" Then
MsgBox "Clear"
Else
MsgBox "Not Clear"
End If
End Sub


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile:
http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=537027



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
isblank [email protected] Excel Worksheet Functions 4 December 23rd 09 05:38 AM
IsBlank Mark Costello[_2_] Excel Discussion (Misc queries) 5 November 7th 08 12:11 PM
IF and ISBLANK projectnewbie Excel Worksheet Functions 4 July 30th 08 05:41 PM
IF AND ISBLANK Louise Excel Worksheet Functions 1 February 7th 08 08:03 PM
IF(ISBLANK) Bill R Excel Worksheet Functions 4 August 13th 05 07:43 PM


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