Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
is there a way to have a macro prompt the user to specify a file to be openedn and then grab data and formulas from that sheet and bring it into a new project. thanks doug |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
Doug, the following is one way to prompt a user for a file:
Dim fNameAndPath As Variant fNameAndPath = Application.GetOpenFilename _ (FileFilter:="Excel Files (*.XLS), *.XLS", _ Title:="Select File To Be Opened") If fNameAndPath = False Then _ Exit Sub MsgBox fNameAndPath To copy data and formulas over depends a lot on your needs. The simpliest way to start is to use the macro recorder. Please note the result often requires a lot of modificaitons. Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "doug" wrote in message ... is there a way to have a macro prompt the user to specify a file to be openedn and then grab data and formulas from that sheet and bring it into a new project. thanks doug |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
Doug,
Take a look at GetOpenFileName method in help. This will give a browser dialog. You then have to open the chosen file, and you will be able tyo access the Activeworkbook Activesheet to get your data. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "doug" wrote in message ... is there a way to have a macro prompt the user to specify a file to be openedn and then grab data and formulas from that sheet and bring it into a new project. thanks doug |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
excel macro - macro initiation upon hitting the ener key | Excel Programming |