View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
DSC[_19_] DSC[_19_] is offline
external usenet poster
 
Posts: 1
Default Need help with data from coding....try to create an update button

Hi Marty

Is this what you want


Code
-------------------

Private Sub btnUpdate_Click()
ActiveCell.Formula = TextBox1.Text
ActiveCell.Offset(1, 1).Formula = TextBox2.Text
ActiveCell.Offset(1, 2).Formula = TextBox3.Text

MsgBox "Record Updated"
End Sub

-------------------


a word of caution here you are looking at a particular cell(Activ
cell) one diagnoally down and right from it and one horizontal to th
second one in such a form as

x
x x

if this is not what you want and you want the choices to be horizonta
change your .offset(1,?) to .offset(0,?) where ? = 1 or 2

HTH

Davi

--
Message posted from http://www.ExcelForum.com