pls urgent....

erin_0502

Registered User.
Local time
Tomorrow, 03:27
Joined
Jul 25, 2007
Messages
20
hello friends..............
anybody help me...
i get error "Label not defined" when i compile my coding...

what the step that i can solve this problem???????????
 
Take a deep breath, step back and type out the EXACT error message and if you click the Debug button on the dialog, which line does it highlight?
 
Pls urgent....

thank for ur response....
this is my coding...

Option Compare Database
Option Explicit

'Public Sub Main()
'ExportDatabaseObjects()
'End Sub

'Public Sub ExportDatabaseObjects()
Public Sub Main()
On Error GoTo Err_ExportDatabaseObject
Dim db As Database
'Dim db As DAO.Database
Dim td As TableDef
'Dim d As Document
'Dim c As Container
Dim i As Integer
'Dim pipes() As String
Dim sExportLocation As String
Set db = CurrentDb()

sExportLocation = "N:\- Guest -\guestbcs\usrPrivate\irni\text file\"
For Each td In db.TableDefs 'Tables
If Left(td.Name, 4) <> "MSys" Then
DoCmd.TransferText acExportDelim, , td.Name, sExportLocation & td.Name & ".txt", True
DoCmd.RunMacro "table_name"
End If
Next td

For i = 0 To db.QueryDefs.Count - 1
Application.SaveAsText acQuery, db.QueryDefs(i).Name, sExportLocation & db.QueryDefs(i).Name & ".txt"
Next i
Set db = Nothing
MsgBox "All table been exported as a text file to " & sExportLocation, vbInformation

Exit_ExportDatabaseObjects:
Exit Sub

Err_ExportDatabaseObjects:
MsgBox Err.Number & " - " & Err.Description
Resume Exit_ExportDatabaseObjects
End Sub

when i run this program error : "Label not defined come out"

it hightlight at line On Error GoTo Err_ExportDatabaseObject...


pls help me....................
 
You are missing an "s" at the end of the line, it should be

On Error GoTo Err_ExportDatabaseObjects
 

Users who are viewing this thread

Back
Top Bottom