+ Reply to Thread
Results 1 to 2 of 2

inserting rows and open file dialog

  1. #1

    inserting rows and open file dialog

    is there any way to create a macro that can open a file and then count
    the number of rows within that file (a csv) insert that amount of rows
    into an existing spreadsheet (where cell is selected) and then copy the
    contents into those new rows?

    one of the problems is that it is not a specific file, so is there a
    way to have the open file window appear aswell?


  2. #2
    Thief_
    Guest

    Re: inserting rows and open file dialog

    In XL 2002,

    Application.FindFile

    This will open a browse-for-file dialog and then open it in a new wb

    or
    fileToOpen = Application _
    .GetOpenFilename("Text Files (*.txt), *.txt")
    If fileToOpen <> False Then
    MsgBox "Open " & fileToOpen
    End IfYou should then open the CSV file, which will open as a new workbook,
    and use VBA to perform whatever actions you like on it!

    --
    |
    +--Thief_
    |


    <[email protected]> wrote in message
    news:[email protected]...
    > is there any way to create a macro that can open a file and then count
    > the number of rows within that file (a csv) insert that amount of rows
    > into an existing spreadsheet (where cell is selected) and then copy the
    > contents into those new rows?
    >
    > one of the problems is that it is not a specific file, so is there a
    > way to have the open file window appear aswell?
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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