+ Reply to Thread
Results 1 to 3 of 3

VBA Excel OpenDialogBox then Transfer the information to Sheet

  1. #1
    Registered User
    Join Date
    04-30-2017
    Location
    Philippines
    MS-Off Ver
    XP
    Posts
    2

    VBA Excel OpenDialogBox then Transfer the information to Sheet

    Hi 😜 Hello, when I incorporate this code as an add-in within Excel, the data doesn't transfer to cells B12, B14, and B16 as expected. However, when I place the code in a module within the workbook itself, it works correctly.

    1. Prompt the user to select an Excel file using the file dialog box.
    2. Open the selected Excel file.
    3. Retrieve the file location, file name, and the name of the first sheet in the Excel file.
    4. Place this information in specific cells of a worksheet (Sheet3 using codename).
    5. Close the selected workbook and quit Excel.
    6. Display a message box informing the user that the process is complete.

    Thank you 🙏

    Please Login or Register  to view this content.
    Also tried this code but no luck
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    09-18-2023
    Location
    Geogia, USA
    MS-Off Ver
    365
    Posts
    100

    Re: VBA Excel OpenDialogBox then Transfer the information to Sheet

    I assigned the add-in to a button on my ribbon. Then I clicked that button, and it returned the information that was expected, using this code:

    Please Login or Register  to view this content.
    Attached Images Attached Images

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,225

    Re: VBA Excel OpenDialogBox then Transfer the information to Sheet

    Writing:
    Please Login or Register  to view this content.
    you are referring to the sheet with the code name Sheet3 in the workbook from which this code was run (that is, from the add-in). Wanting to find a sheet with a specific code name, you unfortunately have to create a loop through the sheets and look for the right one. If you knew the name of the sheet (the one shown on the tab), you could refer to it by:
    Please Login or Register  to view this content.
    Since you only know (you're sure) the code name, then, as I mentioned, only through the loop.
    Please Login or Register  to view this content.
    But I am not convinced that a separate instance of Excel should be used for this task. It seems enough to do it in the same instance.

    Artik

+ 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. Transfer Information from one sheet to another
    By windrain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-05-2017, 12:09 PM
  2. Replies: 5
    Last Post: 12-30-2014, 12:41 PM
  3. Two Issues: Priority Queue and Information transfer - sheet to sheet
    By Spid3rM4n in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 09-23-2014, 03:28 PM
  4. How to transfer information to another sheet
    By miller8093 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-23-2013, 09:49 AM
  5. Looking for a way to transfer information from one sheet to another
    By llgme2004 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-14-2013, 01:30 PM
  6. Replies: 2
    Last Post: 09-11-2012, 04:40 AM
  7. [SOLVED] how do I transfer information from one sheet to another?
    By Dan B. in forum Excel General
    Replies: 2
    Last Post: 04-14-2006, 08:40 AM

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