Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Saving data from an order into a excel repository?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
drucey - 24 Mar 2006 11:52 GMT
Excel people, my heroes...

I have a fantastic purchase order form i've been working on for a week
now, i love it!

It looks just like the old paper version
It fits exactly on an A4 page
It emails great
It faxs great
It calls up all existing placed orders
All partially recieved orders, all completly recieved orders
All draft orders

But when i save an order to do any of the above, it saves the main
sheet, renames it to OrderNumber###.xls, removes some sheets and
functionality that should only be present in the main purchase order
sheet, and works fine.

But it's still over 100k per saved order.
Although they're then saved, and easy to open again and reprint/fax
etc..

I'm thinking it's not the most efficient way of saving them, especially
if we have a few thousand orders per year!

So, i'm after any ideas to help me get my head around this.
Is it possible for a macro to take certain cells and save the value
into another workbook?
And then of course, be able to repopulate the main template using data
from this other workbook?
That way, every order needed to be saved would would only require a row
in a workbook instead of 100k

Possible? Much work?

Signature

drucey

idyllicabyss@googlemail.com - 24 Mar 2006 13:41 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.