Prev Previous Post   Next Post Next
  #1   Report Post  
maya
 
Posts: n/a
Default ques

Hi.

I new in vba+excell

I need to check if any data was inserted in column 13D - 19D
so I wrote:

Private Function check() As Boolean
Dim intCodeIndex As Integer
Dim checkCode As Boolean

intCodeIndex = 13
checkCode = False

While Not Cells(intCodeIndex, "D") = vbNullString ' I need to
improve this line.
checkCode = True
GoTo SUB_EXIT
intCodeIndex = intCodeIndex + 1
Wend

checkCode = False

SUB_EXIT:
check = checkCode

End Function

I need one value in column "D" - so the func return true.

the problem is - if there is not value in row13 the func return false -
although there could be value in row 19.

in order to return FALSE there must be no value in any row 13-19

how can I improve it to be fast and check all the row in column "D".

Thanks.

 
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



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