Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
So you can open the file later?
Option Explicit sub testme() dim myFileName as variant dim wkbk as workbook myfilename = application.getopenfilename("Excel Files, *.xls") if myfilename = false then exit sub 'user hit cancel end if msgbox myFileName 'just to prove that you got it 'to open the file now that you have it: set wkbk = workbooks.open(filename:=myfilename) end sub Jeff wrote: Hi, I want to run a macro and then be able to choose files on my computer, then save the chosen file location as a variable. Is there anyway to do this? Sub Macro() Prompt: Choose filename Variable = Filename End sub Thanks for your help! -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I email amacro? | Excel Worksheet Functions | |||
Location of XLB file? | Excel Discussion (Misc queries) | |||
Links picking up values from an older version of linked file | Links and Linking in Excel | |||
print file path and location in a footer | New Users to Excel | |||
location of backup file | Excel Discussion (Misc queries) |