Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That is not correct, GetOpenFilename doesn't open the file, it just returns
the selected file name. You need Dim sFilename as string sFilename = Application.GetOpenFilename("Excel files (*.xls), *.xls") If sFilename < "" Then Workbooks.Open sFilename End If -- HTH Bob Phillips (remove nothere from email address if mailing direct) "kdp145" wrote in message ... put this after the selection.copy statement filename = Application.GetOpenFilename("Excel files (*.xls), *.xls") Windows(filename).Activate this will prompt the user to select an excel file from the Open file dialog box and activate whichever file the user selects -- kdp145 ------------------------------------------------------------------------ kdp145's Profile: http://www.excelforum.com/member.php...o&userid=29594 View this thread: http://www.excelforum.com/showthread...hreadid=521703 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Enable Macro Prompt | Excel Discussion (Misc queries) | |||
Excel macro to prompt for filename | Excel Discussion (Misc queries) | |||
How do I insert a prompt into an Excel macro? | Excel Discussion (Misc queries) | |||
Prompt user for a filename | Excel Programming | |||
Can a MACRO prompt for the filename to open and/or save? | Excel Programming |