ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a userform to import files (https://www.excelbanter.com/excel-programming/340324-creating-userform-import-files.html)

phileo80

Creating a userform to import files
 
Is there a way to create a userform that will allow browsing to select
a file to import(similar to the get external data function)? I want to
be able to do this without the import file wizard so it is
automatically Delimited with the Space selected. So far I have not
found a way to do it and figure that it is only possible if the
filename is entered into a textbox and the rest is hardcoded. Anyone
have any ideas if this is possible?


George Nicholson[_2_]

Creating a userform to import files
 
No need to make a form to browse for files, use the ones built into Windows.
Here are 2 VBA approaches using windows API calls from the Access Web
(perfectly usable in Excel as well)

http://www.mvps.org/access/api/api0001.htm
http://www.mvps.org/access/api/api0006.htm

Once you get a filename returned, what you do with it is up to you.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"phileo80" wrote in message
oups.com...
Is there a way to create a userform that will allow browsing to select
a file to import(similar to the get external data function)? I want to
be able to do this without the import file wizard so it is
automatically Delimited with the Space selected. So far I have not
found a way to do it and figure that it is only possible if the
filename is entered into a textbox and the rest is hardcoded. Anyone
have any ideas if this is possible?




Vacation's Over

Creating a userform to import files
 
Application.FileDialog(msoFileDialogFilePicker).Sh ow
This might help

"phileo80" wrote:

Is there a way to create a userform that will allow browsing to select
a file to import(similar to the get external data function)? I want to
be able to do this without the import file wizard so it is
automatically Delimited with the Space selected. So far I have not
found a way to do it and figure that it is only possible if the
filename is entered into a textbox and the rest is hardcoded. Anyone
have any ideas if this is possible?




All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com