View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Martin Brown Martin Brown is offline
external usenet poster
 
Posts: 230
Default Open a GroupWise .NAB File

On 29/09/2011 21:24, salgud wrote:
On Thu, 29 Sep 2011 12:44:01 -0700, Gord wrote:

Have you tried popping up the fileopen dialog box?

Application.Dialogs(xlDialogOpen).Show

Pick the *.nab file you want to open and your code does the rest.

As far as naming the resultant file..........that's another story<g


Gord Dibben Microsoft Excel MVP




Thanks for your reply. Unfortunately, that won't work. When the .NAB file
is opened by XL, it automatically starts the conversion process to make it
into an XL file. So the macro can't even be started until that is
completed. Once that's completed, the first part of the macro, which sets
the conversion settings normally done manually, is not needed, and if left
in, trashes the file. I need some way to intervene, (maybe some event
driven code?) and take over the process. Maybe it looks at the file name,
and if it sees the .NAB extension, offers to take over, or detects the file
import routine and offers to take over. But I have never tried to do
anything like that, and don't have a clue where to start.


Use Application.GetOpenFileName instead and pass the resulting filename
chosen by the user to your subroutine.

Regards,
Martin Brown