FancyCorndog
New Member
- Joined
- Aug 9, 2012
- Messages
- 10
Hi all,
I'm trying to accomplish something that I can't seem to figure out in VBA. It's a little hard for me to explain, but I will try my best.
What I want to do is prompt the user with a Windows Explorer window to browse for a file. The file that the user navigates to will be a .csv file that I am going to copy a specific range from.
I've been able to create an Explorer window like this:
Shell("explorer.exe ", vbNormalFocus)
This allows the user to browse for and open a file. But what I want is for that file to be my source for copying, not necessarily opened (or maybe opened, copied, and then closed in the background)
The goal here is for the user to be able to browse and select a file, and once they select it my macro should grab the data (at a range that I already know) and put it into an existing sheet in the current workbook.
1) User hits the "Import File" button
2) Windows Explorer pops up and allows them to navigate to a file.
3) Data from the file that they choose (which is always a .csv file structured in a similar manner) is automatically copied into an existing sheet in the workbook.
Is there a way to accomplish this?
I'm trying to accomplish something that I can't seem to figure out in VBA. It's a little hard for me to explain, but I will try my best.
What I want to do is prompt the user with a Windows Explorer window to browse for a file. The file that the user navigates to will be a .csv file that I am going to copy a specific range from.
I've been able to create an Explorer window like this:
Shell("explorer.exe ", vbNormalFocus)
This allows the user to browse for and open a file. But what I want is for that file to be my source for copying, not necessarily opened (or maybe opened, copied, and then closed in the background)
The goal here is for the user to be able to browse and select a file, and once they select it my macro should grab the data (at a range that I already know) and put it into an existing sheet in the current workbook.
1) User hits the "Import File" button
2) Windows Explorer pops up and allows them to navigate to a file.
3) Data from the file that they choose (which is always a .csv file structured in a similar manner) is automatically copied into an existing sheet in the workbook.
Is there a way to accomplish this?