Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 04-01-2015, 01:31 PM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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.
Reply With Quote
  #17  
Old 04-01-2015, 01:42 PM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

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.
Reply With Quote
  #18  
Old 04-01-2015, 01:47 PM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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
Reply With Quote
  #19  
Old 04-01-2015, 02:20 PM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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...
Reply With Quote
  #20  
Old 04-02-2015, 04:54 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

Quote:
Originally Posted by charlesdh View Post
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...
I added that piece to the code. Thanks!
Reply With Quote
  #21  
Old 04-02-2015, 05:40 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

Quote:
Originally Posted by charlesdh View Post
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..
Code populates fine, only problem is that it doesnt create a new file for each Vendor with the two populated sheets. I was hoping to see the code run and create new files for each Vendor.
Reply With Quote
  #22  
Old 04-02-2015, 06:01 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

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.
Reply With Quote
  #23  
Old 04-02-2015, 11:05 AM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Will taks a look in a few minutes.
Reply With Quote
  #24  
Old 04-02-2015, 11:27 AM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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.
Reply With Quote
  #25  
Old 04-02-2015, 04:48 PM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

Hi,

I revamped the file. Had some code that was not necessary.
Have placed a Msgbox when you run the code.
Attached Files
File Type: xlsm Test Data1.xlsm (22.1 KB, 8 views)
Reply With Quote
  #26  
Old 04-05-2015, 07:48 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

Quote:
Originally Posted by charlesdh View Post
Hi,

I revamped the file. Had some code that was not necessary.
Have placed a Msgbox when you run the code.
Thank you. I'll test it out later tonight.
Reply With Quote
  #27  
Old 04-05-2015, 11:52 AM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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?
Reply With Quote
  #28  
Old 04-06-2015, 07:21 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

Quote:
Originally Posted by charlesdh View Post
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?
I tested the macro last night and this morning. Once I run it, it filters on the first vendor, the message box pops up, but that is it. It doesnt copy any information to the sheets.

Am I doing something wrong?

Thanks!
Reply With Quote
  #29  
Old 04-06-2015, 10:47 AM
ksigcajun ksigcajun is offline Creating multiple spreadsheets based on text Windows 7 64bit Creating multiple spreadsheets based on text Office 2010 64bit
Advanced Beginner
Creating multiple spreadsheets based on text
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

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!
Reply With Quote
  #30  
Old 04-06-2015, 11:05 AM
charlesdh charlesdh is offline Creating multiple spreadsheets based on text Windows 7 32bit Creating multiple spreadsheets based on text Office 2010 32bit
Expert
 
Join Date: Apr 2014
Location: Mississippi
Posts: 382
charlesdh is on a distinguished road
Default

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.
Attached Files
File Type: xlsm Test Data1.xlsm (22.2 KB, 7 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating multiple spreadsheets based on text Creating a table that automatically updates based on entries of a heading in the document cahphoenix Word 3 10-29-2014 01:11 PM
Creating multiple spreadsheets based on text 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
Creating multiple spreadsheets based on text Need help creating a Word document that is populated based on certain selected values alidaanish Word 1 01-10-2014 10:44 PM
Creating multiple spreadsheets based on text Creating Report based on 'Task Summary' and 'Sub Tasks' alijahed Project 1 02-01-2013 04:20 AM
Creating multiple spreadsheets based on text Creating formula based on if data is correct in cell MattMurdock Excel 1 08-06-2012 03:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft