Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

user form that i can put in the co-ordinates in the first bit and the data in the second bit a

  Asked By: Nichole    Date: Jan 17    Category: MS Office    Views: 728
  

I have an excel spreadsheet.. its a 51x51 grid.. i need a user form
that i can put in the co-ordinates in the first bit and the data in the
second bit and for it to input this info onto the grid..

ie: a user types 2608 in the first window and 123 in the second
window.. i want 123 to be input into cell 2608 (xxyy) and possibly a
3rd option of adding a comment to the cell too..

hope this makes sense and somebody can help??!

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Bonifaco Garcia     Answered On: Jan 17

Try this code in your UserForm:

Private Sub CommandButton1_Click()
xx = Mid(TextBox1.Value, 1, 2) * 1
yy = Mid(TextBox1.Value, 3, 2) * 1
'Note: * 1 converts strings to numbers
'To Do: limit xx & yy to valid range
ActiveSheet.Cells(xx, yy).Formula = TextBox2.Value
Unload Me
End Sub

 




Tagged: