View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default quick code question

Hard to tell how this really looks, but it will work if it is set up like
this:

If Sheet16.Range("printcell") = 1 Then
Sheet16.Range("exp_loss_page_no").Value= b + 1
Else
Sheet16.Range("exp_loss_page_no") .Value= 0
End If


If you want it all on one line you don't need End if

--
Regards,
Tom Ogilvy

"dave!!" wrote in message
...
can anyone tell me what's wrong with this??

If Sheet16.Range("printcell") = 1 Then Sheet16.Range("exp_loss_page_no")
.Value= b + 1 Else
Sheet16.Range("exp_loss_page_no") .Value= 0
End If