#1
|
|||
|
|||
Compile error: sub or function not defined..
Hi,
i got a code that export sheet to a text file from the web, the code works excelent in my home pc excel 2007 but i get the error i mentioned when i try to run the same code on my work pc in excel 2003 @2007 both. google has alot of info about this kind of error but i still cant solve it. i got the code from http://www.cpearson.com/excel/ImpText.aspx i attach the first part of the code. Sub DoTheExport() Dim FileName As Variant Dim Sep As String FileName = Application.GetSaveAsFilename(InitialFileName:=vbN ullString, FileFilter:="Text Files (*.txt),*.txt") If FileName = False Then '''''''''''''''''''''''''' ' user cancelled, get out '''''''''''''''''''''''''' Exit Sub End If Sep = Application.InputBox("Enter a separator character.", Type:=2) If Sep = vbNullString Then '''''''''''''''''''''''''' ' user cancelled, get out '''''''''''''''''''''''''' Exit Sub End If Debug.Print "FileName: " & FileName, "Separator: " & Sep ExportToTextFile FName:=CStr(FileName), Sep:=CStr(Sep), _ SelectionOnly:=False, AppendData:=False End Sub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
User Defined Default Settings in Insert | J_oe | Word | 1 | 02-17-2011 10:55 AM |
Change fonts of a defined word with VBA | Michael007 | Word | 6 | 02-01-2011 04:52 PM |
compile error in Word | raco | Word | 0 | 09-28-2010 12:40 PM |
TOC printing Error Bookmark not Defined | techexpressinc | Word | 0 | 12-14-2008 05:24 PM |
Defined Views in Tasks | Inga | Office | 3 | 07-20-2005 07:10 AM |