Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks all
It works like a charm Daniel "Don Guillett" wrote: You may have had the dreaded space bar in cell a2 so try Sub exitif() With ActiveSheet 'If Cells(2, "a").Value = "" Then Exit Sub If Len(Application.Trim(Cells(2, "a"))) < 1 Then Exit Sub MsgBox "hi" End With End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Daniel" wrote in message ... Thanks Bob I code this at the begin of sub and cause error?? with activesheet If Cells(2, "a").Value = "" Then Exit Sub end if "Bob Phillips" wrote: A row of a column? Do you mean a cell? If Cells(the_row_num, "the_Column_letter").Value = "" Then Exit Sub -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Daniel" wrote in message ... hi How can I code so that my VBA will exit sub if no data in a row of a column? Thanks Daniel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
exit cell automatically after entering data | Excel Worksheet Functions | |||
Exit Field vs Exit Button...... | Excel Programming | |||
Do not propmt to save data on exit | Excel Worksheet Functions | |||
Validation data on exit Excel or save | Excel Programming | |||
If a called sub exit, how to the caller exit right away? | Excel Programming |