-
Hi,
I'm trying to move an Excel application run by macros to a VB application to make it more fool-proof. If the steps required by the macro are not followed, the master data gets corrupted.
Using the normal method of dimming and setting the Excel objects brings up the full Excel program.
Is there a way of getting an existing Excel worksheet onto a VB form so that the sheet can be edited or is there another way of accomplishing the below?
This is a simple Excel application. A master sheet contains a list of all items that are to be returned from our field warehouses, currently 2254 items. When a shipment is received from one of the warehouses, the warehouse number is entered into a textbox on the working Excel sheet. The macro copies the items for that warehouse from the master sheet to the working sheet. The receiving department simply clicks on the "received" field for each item that was in the shipment and this places today's date in the field. When done the data is copied back to the master sheet with the date in the field for those parts that were received. When the program is exited, a macro sorts the data by "Received date" which places all the received items at the bottom of the sheet. This data is cut from the master sheet and pasted to the bottom of the "Items Received Sheet". But if the receiving department doesn't use the Exit command button but uses the Windows close [X] button, the last macro doesn't run.
Al.
-
You could use an OLE control for this.
I haven't used them untill now, because I don't like the looks, but it might be appropriate for your purpose.