VBA to BROWSE and COPY Data from SELECTED File in Excel
VBA to BROWSE and COPY Data from SELECTED File in Excel
VBA to BROWSE and COPY Data from SELECTED File in Excel
 

 
Use this simple Excel VBA macro to allow the user to browse for the file they need to import or copy the data from. They will get Excel's open File Dialog Box and they can browse and select the workbook to copy the data from. 
 
We use VBA GetOpenFilename method to Open the workbook selected in the background, copy the data and then close the workbook. The user will not even realize the other workbook was opened in the background.  
 
I will also show you how to avoid getting the message "method getopenfilename of '_application' failed". This is a common error when using the application.getopenfilename method and it can easily be avoided by declaring the correct variable type.  You can expand on this Excel macro to copy data from multiple ranges or multiple sheets or create dynamic ranges. 

Related Topics:

Post a Comment

Previous Post Next Post