Wait opening file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I have a macro that need to browse for a file. I'm using GetOpenFilename
method. What i need to do now is to wait until the file is loaded to continue
the execution of the code.
Is this possible?

Thanks.
 
Luis,

Try this...
Dim strFreshFile as String
Dim wkbFreshFile as Workbook

strFreshFile = Application.GetOpenFileName(what ever paramters you've got)
if strFreshFile <> "False" Then
Set wkbFreshFile = Workbooks.Open(Filename:=strFreshFile)
end if

This should do the trick.
Dale Preuss
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top