'....loses focus of textboxes
Private Sub Commandbutton_Click()
Me.TxBName.Enabled = CBool(Me.TxBName.Value = "")
Me.TxBAddress.Enabled = CBool(Me.TxBAddress.Value = "")
Me.TxBCity.Enabled = CBool(Me.TxBCity.Value = "")
if Me.TxBName.Enabled<"" And Me.TxBAddress.Enabled<"" And
Me.TxBCity.Enabled<"" Then Activeworkbook.Save
else
Msgbox "Please fill out all the fields"
end if
End Sub
:( It doesn't work... what am I doing wrong??
- Larry -
VBA Amateur
---
Message posted from
http://www.ExcelForum.com/