View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] idyllicabyss@googlemail.com is offline
external usenet poster
 
Posts: 32
Default Saving data from an order into a excel repository?

It will depend somewhat on whether you have used contrrols directly on
a sheet or if you have created a UserForm but essentially you just need
to get coding!
If all your objects are the same you may be able to loop through them
rather than hard code. eg textbox1, textbox2, textbox3 etc
If you have a save button or something, the code would be along the
lines of

src = Sheets("Form")
dest = sheets("Database")
NR = ' use code to determine the next row - plenty of examples on this
website
dest.cells(NR,1).value = TextBox1.value
dest.cells(NR,2).value = TextBox2.value
....etc

or this should work if they're all text boxxes and you laid them out in
order they are to be stored in;
for i = 1 to src.Shapes.count
dest.cells(NR,i).value = TextBox(i).value
next i

I haven't tested this but I used something similar a while ago for a
picking list.