#16
|
|||
|
|||
Hi,
Remember the Vendors workbook and the file should be in the same folder on your drive. Also i have bit of code that will exit the sub after it look for the first vendor. it's Called "Exit Sub" remove it to test all vendor's workbook. If you are leaving data in the TestFile you will need some way of knowing that you already populated the vendor's workbook. And, too, when you open the ven workbook the code will over write sheet 1, but will add to sheet. Not sure if want it that way. |
#17
|
|||
|
|||
Real quick,
When you say set your path, am I adding the path to my TestData file or the forms? Also for sheet name? Just want to make sure Im putting the right information there. |
#18
|
|||
|
|||
When you look at my code try to follow what it is doing.
As for sheet names. If in the actual workbook you have a sheet name other that "Sheet1" then change it to the actual sheet name. That goes for both Vendor and text data workbook I have skype. If necessary.. Last edited by charlesdh; 04-01-2015 at 01:48 PM. Reason: adde info |
#19
|
|||
|
|||
Oops,
You need to add this bit of code to the main code. Yow will put it above the "Next Item" Fpass = False Otherwise sheet1 will not get populated when you let code run for all of the workbooks. Sorry... |
#20
|
|||
|
|||
I added that piece to the code. Thanks!
|
#21
|
|||
|
|||
Quote:
|
#22
|
|||
|
|||
I took off the "Exit Sub" to allow the code to work for all vendors.
Once complete, it fills out Sheet1, but only for the last Vendor. Im guessing its overwriting each Vendor. Sheet2 is populated with the info of all the Vendors. I was hoping it would create individual sheets for each vendor instead populating one for all. |
#23
|
|||
|
|||
Will taks a look in a few minutes.
|
#24
|
|||
|
|||
Hi,
We need to save and close the vendors worksheet before we open the. As far as creating a "New Vendor" file I did not see in your post that you needed this. I believe you need to create a template so if required you can create the new vendor. |
#25
|
|||
|
|||
Hi,
I revamped the file. Had some code that was not necessary. Have placed a Msgbox when you run the code. |
#26
|
|||
|
|||
Thank you. I'll test it out later tonight.
|
#27
|
|||
|
|||
HI,
I also changed the way the program looks at it's path. I set it to "Thisworkbooks path" So any and all file that you run the code for must be in the same and folder on your hard drive. Also, how go you input your data? |
#28
|
|||
|
|||
Quote:
Am I doing something wrong? Thanks! |
#29
|
|||
|
|||
I was able to get the macro to run. Is there any way you can add a save as function after it runs for a vendor?
Lastly, can you make Sheet2 clear before adding new data for each Vendor? Right now it keeps adding it to the next row. Thanks! |
#30
|
|||
|
|||
Hi,
My error. Should have tested further. Check this copy. It should copy data to the workbook and close it. Then it should open next workbook. If the next Vendor does not exist you will get the Msgbox. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a table that automatically updates based on entries of a heading in the document | cahphoenix | Word | 3 | 10-29-2014 01:11 PM |
I need to add multiple values based on multiple criteria in a cell not sure what to do | AUHAMM | Excel | 3 | 10-27-2014 09:11 PM |
Need help creating a Word document that is populated based on certain selected values | alidaanish | Word | 1 | 01-10-2014 10:44 PM |
Creating Report based on 'Task Summary' and 'Sub Tasks' | alijahed | Project | 1 | 02-01-2013 04:20 AM |
Creating formula based on if data is correct in cell | MattMurdock | Excel | 1 | 08-06-2012 03:11 AM |