Hello Again to everyone,
Can anyone help to write VBA macros to export data from listvie1 control to a new workbook.
Sample workbook is attached for your reference.
Hello Again to everyone,
Can anyone help to write VBA macros to export data from listvie1 control to a new workbook.
Sample workbook is attached for your reference.
Last edited by hecgroups; 01-23-2015 at 10:29 AM.
Hi hecgroups
Does the New Workbook exist or does it need to be created?
Will the New Workbook be in the same Folder as the Source Workbook?
If the New Workbook is to be created, how will it be Named?
What version of Excel does it need to run in (you attached an .xls File)?
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Hai Jaslake,
First of all i would like to thank you to respond to my request. I will change the file version to *.xlsm once I finalized the file.
Better idea is to create new workbook.
If you can give me 2 option like Save or not to save a workbook.
If not save then new workbook will be activate or If saved then the textbox1 value will be the saved workbook name.
Kindly note that if the items more than 1048576 then it should copy a data to new sheet with header.
Hi hecgroups
Attach this Code to Command Button 2![]()
Please Login or Register to view this content.
Hai Jaslake,
It works but while copying the data is copying the row numbers. Can we skip the row number while copying.
second thing I have some data which is under one million items but some I have more than 5 million items. so I just want to search multiple worksheets in a workbook.
while copying if the data is more than a million it will select another worksheet within the same workbook and start copying the data.
I don't know it is possible or not
Sorry to tell you can we have count of records found on same form Label3.
Hi hecgroups
This is simple enough...hide Column 1 or a minor Code revision to eliminate Column 1...This, I assume, can be done...Can we skip the row number while copyingYou mention this yet your Sample File does not demonstrate such.can we have count of records found on same form Label3This, I have no clue... 5 million records???...the Code may take DAYS to run...I'll not touch it with a stick. Far as I know, Excel will accommodate only 1 million records (plus some change).search multiple worksheets in a workbook
You'll need to update your Thread with a new Sample File that demonstrates what you have and what you wish it to be...I'm not seeing that at the moment.
Thanks for the information.
atleast can you make a search on multiple worksheets (Sample attached)
I have set an example on userform for row count.
let assume that I am searching foot in entire workbook. There are total 10 items in whole workbook
I hope with this requirement my will be solved.
Hi hecgroups
I'll look at it tomorrow...late here.
Hi hecgroups
The Code in the attached has been modified to do thisand thismake a search on multiple worksheetsand thisCan we skip the row number while copyingI'll look at this but I have no way of testing so, don't hold your breathcan we have count of records found on same form Label3while copying if the data is more than a million it will select another worksheet within the same workbook and start copying the data.
Thanks Jaslake,
it is working. I thought my last post will be the last request but unfortunately I find something unusual.
while copying the data from listvew control to new workbook it is changing the column A values.
let say i am searching a work consult it is showing correct values on control but on worksheet the items which is starting with zeros is disappearing.
on control 001 but on worksheet 1
Actual data
Service Code Service Name Service Type Price Discount Start Date
0001 INTERNIST CONSULTION Consultation 35 0 22-02-2013
Output on new workbook
Service Code Service Name Service Type Price Discount Start Date
1 INTERNIST CONSULTION Consultation 35 0 22-02-2013
Sample workbook is attached for your reference. just search a data and export to new workbook. See the row numbers 6, 7 & you will find the values changed.
Hi hecgroups
Add the indicated line of Code![]()
Please Login or Register to view this content.
Jaslake,
Thanks a lot for your time and valuable help. You cannot imagine how much time you have saved.
I hope their no issue. incase if I find anything can I contact you again.
Topic marked as solved and reputation added.
Hi hecgroups
You're welcome...glad I could help. Thanks for the Rep.
If you have other issues, feel free to contact me. In the meantime I'll look at the "Splitting of Records" issue.
Hi hecgroups
The Code in the attached has been modified to split the Records to a second Worksheet based on "myLimit" in Private Sub CommandButton2_Click().
I have it set at 10 for testing. Let me know of issues...![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks