Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Macro to export as Text, only the results not the formula

Hi,

I am using this macro to export to a text file but I have vlookups and
other formulas that when I export only the formula gets exported, what
I need i to export ONLY the results of the query.

Public Sub SaveAsTXT()
fileSaveName = Application.GetSaveAsFilename( _
FileFilter:="Text Files (*.txt), *.txt")
If fileSaveName < False Then
MsgBox "Save as " & fileSaveName
End If
End Sub

Thank you,

Muaitai

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Macro to export as Text, only the results not the formula

Your code doesn't show how you saved the file.

If fileSaveName < False Then
MsgBox "Save as " & fileSaveName
activeworkbook.saveas filename:=filesavename, fileformat:=xltext
End If

You may want to record a macro when you save the file manually so that you get
the fileformat that you really want.

wrote:

Hi,

I am using this macro to export to a text file but I have vlookups and
other formulas that when I export only the formula gets exported, what
I need i to export ONLY the results of the query.

Public Sub SaveAsTXT()
fileSaveName = Application.GetSaveAsFilename( _
FileFilter:="Text Files (*.txt), *.txt")
If fileSaveName < False Then
MsgBox "Save as " & fileSaveName
End If
End Sub

Thank you,

Muaitai


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro linked to text or an object areaume Excel Discussion (Misc queries) 1 May 15th 06 08:15 PM
Why does formula show rather than results (not in text format) Caseybay Excel Worksheet Functions 4 April 24th 06 08:51 PM
Help! All results of my formula are the same! ziak Excel Discussion (Misc queries) 3 February 28th 06 08:13 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Macro or Formula to remove Text from Cells smck Excel Worksheet Functions 6 May 11th 05 03:22 AM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"