View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Beth[_4_] Beth[_4_] is offline
external usenet poster
 
Posts: 2
Default Creating a txt file from a macro

I am trying to create a simple text file that contains some
information from an Excel sheet. I am trying to create an Excel Add-In
that will run the macro that I have written to create this file.
Everything works fine if I specify a path to the text file, but I
would like to allow the user to enter the path and name for the file.
I am trying to use the FileDialog object, which seems to work ok if
the type specifed is anything but msoFileDialogSaveAs, which I believe
is what I need. When I specify this type, Excel crashes on me, without
supplying any information about why. Does anyone have any idea why
this might happen, or how I can get around it?