![]() |
![]() |
|
|||||||
| 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
Posts: 12
|
what macro should i use to
a) open a folder by clicking on a button (exactly the same as what the "open" icon does) b) close the program (prompting to save as usual) thank you |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
For b)
End the code with: Application.displayalerts=true Application.Quit |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 12
|
thanks
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
For part a), do you want to open a specific file or just the open dialog to appear?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
I may as well just put both options here and then you can choose. Just put either of these codes on your button click.
Workbooks.Open FileName:="Enter The File Name Here" Application.Dialogs (xlDialogOpen).Show |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Posts: 12
|
Thank you.
it was just the open dialogue i needed. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|