+ Reply to Thread
Results 1 to 3 of 3

Excel vba, find sheet between workbooks with variable condition

  1. #1
    Registered User
    Join Date
    01-18-2022
    Location
    Lisbon
    MS-Off Ver
    Excel 2019
    Posts
    2

    Excel vba, find sheet between workbooks with variable condition

    Hi Guys,

    I'm running into an issue here!

    I'm not experienced with excel, but I have a soft understanding of it.

    Most of the steps are already done (I Think ) but the major issue is finding the sheet between workbook1 and 2 depending on the ComboBox value. Then I want to paste the information on the target sheet.
    So my logic is..

    .Set the workbook1 and 2 directories
    .If the WB2 sheet is = to the WB1 Combobox value, then the found sheet should open. (here is the main issue)
    .Paste the data onto the specific range in that sheet
    .Save and close WB2 and return to WB1

    The code that I already have:
    HTML Code: 
    Hopefully, you guys and give me a hand on it.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel vba, find sheet between workbooks with variable condition

    Rather than trying to backwards engineer the process, please upload the two workbooks and clearly explain what you want to see as a result by manually creating the result.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    01-18-2022
    Location
    Lisbon
    MS-Off Ver
    Excel 2019
    Posts
    2

    Re: Excel vba, find sheet between workbooks with variable condition

    I figured out!

    1º I made it open the workbook with the file address
    2º I activated that same workbook
    3º Made a string that find the ComboBox value so it can find the sheet name and it worked perfectly !!
    4º It uses that string to paste the info onto the other workbook

    I'm going to leave the code here just in case any of you have the same issue in the future
    Please Login or Register  to view this content.

+ 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. how to find minimum of 4 variable with a condition greater than zero
    By dorabajji in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-11-2019, 08:53 AM
  2. [SOLVED] EXCEL Find variable data from one sheet and copy entire row to another sheet
    By Crawfy in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2017, 06:21 AM
  3. VBA Excel: Import variable file name and variable sheet name NEED HELP
    By Mark6109 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2012, 12:32 AM
  4. A control sheet to find values in other workbooks
    By kchm_2000 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-27-2011, 10:58 AM
  5. Find, Copy, Paste variable rows to another sheet
    By wkhor in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-23-2011, 07:37 PM
  6. How to identify variable workbooks in an excel Addin
    By Martin in Frisco Texas in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-15-2005, 04:05 PM
  7. [SOLVED] Excel 2003 Referencing multiple workbooks via single variable
    By BBohannon in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-20-2005, 04:06 PM

Tags for this Thread

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