LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Pam Pam is offline
external usenet poster
 
Posts: 128
Default if then else

I am trying to do a very simple statement, but vb6 keeps giving me errors on
this line.
I want to search for the next available line (that is empty).
Here's my code, what have I done wrong? It is giving me the error on the
line after the If IsEmpty line.
Thanks
Pam

Private Sub CmdSaveChanges_Click()
ActiveWorkbook.Sheets("Order").Activate

Range("A1").Select

Do

If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If

Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Value = TextDate.Value

ActiveCell.Offset(0, 1) = ComboWebsite.Value

If NewCust = True Then

ActiveCell.Offset(0, 2).Value = "New Customer"

ElseIf ExistCust = True Then

ActiveCell.Offset(0, 2).Value = "Existing Customer"

End If
 
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 03:40 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"