Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I want to write a macro to import an external csv file into a sheet. However when I use macro recorder to record the macro, the code output only show a file name. My target is to ask user to choose file to import. How can I write that macro -- hurrianc ----------------------------------------------------------------------- hurriance's Profile: http://www.excelforum.com/member.php...fo&userid=3088 View this thread: http://www.excelforum.com/showthread.php?threadid=55178 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub testme() Dim myFilename As Variant myFilename = Application.GetOpenFilename _ (filefilter:="CSV Files, *.csv")) if myFilename = false then exit sub 'user hit cancel end if 'stuff to import the file end sub hurriance wrote: I want to write a macro to import an external csv file into a sheet. However when I use macro recorder to record the macro, the code output only show a file name. My target is to ask user to choose a file to import. How can I write that macro? -- hurriance ------------------------------------------------------------------------ hurriance's Profile: http://www.excelforum.com/member.php...o&userid=30882 View this thread: http://www.excelforum.com/showthread...hreadid=551783 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import external data | Excel Worksheet Functions | |||
External Data Import | Excel Discussion (Misc queries) | |||
import external data | Excel Discussion (Misc queries) | |||
Import External Data - XML | Excel Discussion (Misc queries) | |||
Import External Data | Excel Worksheet Functions |