+ Reply to Thread
Results 1 to 5 of 5

Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

  1. #1
    Registered User
    Join Date
    05-03-2012
    Location
    Midland, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

    Hello,

    I am looking for a VBA script for a button to open an excel doc (with GetOpenFilename) and start the data in row A5 instead of A1. I would like to keep rows 1-4 open for buttons and permanent data. Can anyone help with this? I am running excel 07.

    Thanks!

    -Ryan

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

    Not sure what you're after here. It sounds like you'd like to open a closed workbook "Button to open .xls" and put it's contents into the active sheet of the workbook which will be running the macro, and that you'd like the copied data to start at cell A5. Is that what you're trying to do?
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    05-03-2012
    Location
    Midland, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

    Yes, that is what I would like. This image shows what i am looking for: Capture.JPG

    Thanks for your response

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

    Try this:
    Please Login or Register  to view this content.
    Note that this assumes you have working code to open the file, just need something to migrate data. It also assumes that data is always and only found on the first sheet in the book you are opening. It also assumes you will only have your target book that you are copying from and your destination workbook open, and no other workbooks.
    Last edited by tlafferty; 06-05-2012 at 04:56 PM. Reason: further explanation of code

  5. #5
    Registered User
    Join Date
    05-03-2012
    Location
    Midland, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Button to open .xls in active sheet, with data beginning in cell A5 instead of A1

    tlafferty,

    Good code, but not quite what I am looking for. I would like the "open file" button to allow me to choose which excel file I want to copy data from, not have to have both target and destination open. There are also 2 sheets in the workbooks I am drawing data from. Sorry I was not clear on this before.

    I would like to open workbook A.xlsm, click an "open file" button, choose workbook B (data source), have all of the data in workbook B opened in workbook A starting at A5

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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