Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am new to Excel vba programming. I am stuck with a problem:
We want to put a button on an Excel sheet. when user clicks it, there will be browse message box popping up, and user can select a file stored in local disk. When it is successfully loaded, the macro could read data from the file. Can anyone give some sketch of how to do it? many many thanks!! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could start with this which displays your default folder.
Sub open_file() filetoopen = Application _ .GetOpenFilename("Excel Files (*.xls), *.xls") If filetoopen < False Then Workbooks.Open Filename:=filetoopen End If End Sub Browse to your workbook and Open it. Note: the opened workbook will now be Activeworkbook. Gord Dibben MS Excel MVP On Tue, 1 Jun 2010 09:04:01 -0700, Joy wrote: I am new to Excel vba programming. I am stuck with a problem: We want to put a button on an Excel sheet. when user clicks it, there will be browse message box popping up, and user can select a file stored in local disk. When it is successfully loaded, the macro could read data from the file. Can anyone give some sketch of how to do it? many many thanks!! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
load a PDF file with VBA | Excel Programming | |||
How do I load a file from URL | Excel Programming | |||
File will not load | Excel Discussion (Misc queries) | |||
Is it possible to load an .xls file | Excel Programming | |||
How to load a help file using VBA | Excel Programming |