Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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_ | wrote in message oups.com... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
File open dialog box | Excel Discussion (Misc queries) | |||
file open dialog | Excel Programming | |||
File Open Dialog | Excel Programming | |||
open file dialog-select file-import worksheet | Excel Programming |