![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: houston, tx
Posts: 4
|
is there a way to utilize VB to prompt the user for a source file path/name and a destination file path/name? (ideally, the user would be able to "Browse..." from within the box.)
thanks in advance, rs |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Feb 2002
Posts: 74
|
Quote:
Create a CommandButton and use this sort of code: Private Sub CommandButton1_Click() Dim Filter As String, Caption As String, SelectedFile As Variant Filter = "Fountains (*.xls),*.xls" Caption = "Please Select the Fountain of Youth" SelectedFile = Application.GetOpenFilename(Filter, , Caption) If SelectedFile = False Then Exit Sub Workbooks.Open SelectedFile Set SelectedFile = Nothing End Sub
__________________
"Interfere? Of course we should interfere! Always do what you're best at, that's what I say!" -- The Doctor, Nightmare of Eden |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|