+ Reply to Thread
Results 1 to 10 of 10

Required vba code copy data sheets to new workbook & retn to old sheet userform

  1. #1
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Required vba code copy data sheets to new workbook & retn to old sheet userform

    Dear Sir,

    I want to required vba code copy data from sheets to new workbook .
    for exp ;
    1. listbox1.value select option 1 then copy sheet1 to new workbook
    2. listbox1.value select option 2 then copy sheet2 to new workbook
    3. listbox1.value select option 3 then copy sheet3 to new workbook

    when complete the task , then goto return userform1 .

    thank you all..

    listbox.png

    Please Login or Register  to view this content.

    error.png
    Attached Files Attached Files

  2. #2
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    Hi sbvaram,

    Try below code ...
    Please Login or Register  to view this content.
    Last edited by nankw83; 11-12-2020 at 12:57 PM.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  3. #3
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    Dear Sir, Thank you for your fast reply
    Sir, its working correctly.

    Can you give me the code of if else condition, because I can use the For loop in the future, and after the new workbook is created, I have to come back to the userform also. can is possible?

    Thank you again..

  4. #4
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    I'm not sure what you're trying to achieve ? Can you explain what you want to do & perhaps we can assist with the required code

  5. #5
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    For expample small change in listbox option
    1) i want to rows grater than 5000 amount in new worksheet
    2 ) i want to rows lower than 4000 amount in new worksheet
    in vba if condition and after cursor retn to userform1
    RETN TO USERFORM.png

    Thank You
    Attached Files Attached Files

  6. #6
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    Is this what you're looking for ? Data will be populated in Sheet2

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    ohh sorry sir,my typing mistake i want to actually above 5000 rows in all sheets output report in new Workbook not worksheet. & when task completed cursor is return to userform1.

  8. #8
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    Try below code ...
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    06-16-2018
    Location
    India
    MS-Off Ver
    2019
    Posts
    174

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    nankw83 sir, Thank you very for your fast reply , & working Perfect

    Give it to me as i wanted.
    Thank you again..

  10. #10
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,712

    Re: Required vba code copy data sheets to new workbook & retn to old sheet userform

    Glad to help & thanks for the added Rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] amend code copy data from userform to sheet before lastrow
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-14-2020, 01:05 PM
  2. Userform Code Required to Control Data between Database and Input Sheet
    By Rudidw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2020, 01:15 AM
  3. [SOLVED] vba code to paste data from different sheets to one single sheet in same workbook
    By Ishwarind in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-11-2016, 02:39 AM
  4. VBA COde For copy and paste B column of every sheets to new workbook in one sheet
    By Chetan_raghu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2016, 02:22 PM
  5. [SOLVED] VBA code required to insert extra/New sheets with existing sheet data
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2015, 01:52 AM
  6. Code Required To Use Condition To Copy Data From Different Worksheets Into Another Sheet
    By lukerogers1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2012, 05:26 AM
  7. Replies: 0
    Last Post: 08-11-2011, 01:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1