+ Reply to Thread
Results 1 to 2 of 2

VBA To Open Template From Active Sheet, Copy Specific Data To Template,Close Active Sheet

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    VBA To Open Template From Active Sheet, Copy Specific Data To Template,Close Active Sheet

    I am new to VBA Macro Coding. In a prior life was proficient in original Excel Macro coding so I am familiar with programming logic but I am green in the concepts of opening and closing files and moving data between them.

    I have a third party software program that exports to Excel. Plan A was to have an auto-executing Macro run upon this export but my research has found that this is not possible due to the way that these third parties launch excel.

    Plan B is now to have an add-in Macro that can be launched that will perform the following:

    (while in the active excel sheet that was launched by the third party)
    1. Open a template file
    2. Copy specific cells from the active sheet to a specific spot in the template (cell data is always in the same place)
    3. Close the active sheet and make the template the active sheet

    As an example, looking to copy values in cells b2, b3 and b4 from the active sheet to the template in locations c2,c3 and c4 respectively.

    Have been attempting to derive this from questions/answers in other treads without success.

    Any help would be greatly appreciated.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA To Open Template From Active Sheet, Copy Specific Data To Template,Close Active Sh

    This would basally do your three steps.

    Please Login or Register  to view this content.
    I would think this could automatically run from an add-in.

    I haven't tried this before, but the add-in macro may be able to detect the third-party workbook (criteria TBD) and then run the code above. What is the third party software?. Does it open excel and load its file, or does it paste data to a blank worksheet?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. Replies: 0
    Last Post: 06-24-2013, 11:27 AM
  2. Copy the data in any active row in Sheet 1 to specific cells in Sheet 6
    By cti4sw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2013, 02:43 PM
  3. Copy active sheet to a new workbook, close that work book and return
    By nig_44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2012, 02:24 AM
  4. Copy my active sheet to a new sheet and open with an input form
    By Brad Withrow in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2006, 11:00 PM
  5. Copy from active sheet and paste into new sheet using info from cell in active
    By Ingve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2006, 06:00 PM

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