ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Drop-Down List to Choose File to Open (https://www.excelbanter.com/excel-programming/299837-drop-down-list-choose-file-open.html)

tbchief

Drop-Down List to Choose File to Open
 
I would like to be able to choose a filename from a drop-down combo bo
and then open the file by clicking on a button with a macro link.

The problem is when I tried recording the macro, I am only able t
record one file name and I would like to be able to open up any fil
selected, so that it can be pasted into a sheet in the curren
workbook.

Here is what I have so far:

Sub Button7_Click()
Range("N3").Select
Selection.Copy
ChDir "I:\Inv\H R"
Workbooks.Open Filename:= _
"I:\Inv\H R\CH(March).xls"
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Windows("Copy of K P M v4.xls").Activate
Sheets("data").Select
Cells.Select
ActiveSheet.Paste
Windows("CH(March).xls").Activate
ActiveWindow.Close
Sheets("PM").Select
Range("K20").Select
End Sub

Any suggestions on how to make this work? Please be as specific a
possible, because I'm new at this. Thanks

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 07:02 AM.

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